Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to centre SVG logo #93

Closed
jdhirst opened this issue May 24, 2024 · 3 comments
Closed

How to centre SVG logo #93

jdhirst opened this issue May 24, 2024 · 3 comments

Comments

@jdhirst
Copy link

jdhirst commented May 24, 2024

How does one centre the logo image on the screen? It seems to be left aligned by default. This is my logo.ftl:

<#macro kw>
  <div class="font-bold text-center text-2xl">
    <img src="${url.resourcesPath}/logo_light.svg" class="logo">
    <#nested>
  </div>
</#macro>

I tried adjusting my svg but it starts to look weird on different sized screens so I guess there is a better way 😅

@jdhirst
Copy link
Author

jdhirst commented May 24, 2024

@jarulsamy I copied your example in #79, do you have the same issue as me or is yours aligned correctly?

@jarulsamy
Copy link

My logo image centered fine, I didn't have to do anything special using the FTL you included above. Perhaps your logo dimensions are affecting this? My logo dimensions were 951 x 752.

You could also try adjusting the parent div to adjust your centering options. For example:

. . .
<div class="font-bold text-center text-2xl flex justify-center items-center">
. . .

@jdhirst
Copy link
Author

jdhirst commented May 27, 2024

Yep, that worked perfectly, thanks!!

@jdhirst jdhirst closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants