Page 1 of 1

Index Page: Place Logo in center

Posted: 16 Apr 2020, 10:15
by tbp
Hi,

another question: Is there a way to place the logo (jpeg/png) in the middle (horizontal and vertical) of the frontpage (index page) only?
I want my logo right in the center of the photo on the index page, but on all other pages it should be on its standard position.

Thanks
Thomas

Re: Index Page: Place Logo in center

Posted: 16 Apr 2020, 23:57
by mjau-mjau
Yes, but this is not built-in functionality, as it's too abstract.

Almost anything is possible with custom CSS though. Try this simple fix:
Code
.page-index .logo {
  margin-top: calc(50vh - 108px);
}
We use "page-index" to assign the style only to the index page. Every page has a body class "page-{folder-path}", so that CSS styles can be assigned on a per-page basis. Then we just add 50 vh (viewport height) margin, minus half the height of the logo, so that it's centered.