Hi all,
is there a way to make the footer stay at the bottom of the page when the page content is less than viewport height in the page templates?
in oxygen template i use min-height calc(100vh - (header height + footer height)) on the inner content container to set the minimum height of pages with little content so that the footer stays at the bottom of the page.
is there a way to do same thing in Bricks without doing it on each and every page where the content is less than viewport height?
I donât think so, because it heavily relies on the individual layout, individual heights, and so on⊠and in itâs simplest approach it is just one single line of CSS - that really should not overwhelm anyone
But feel free to add it to the idea board. If it getâs a high amount of votes, it will be implemented!
Instead of targeting #bricks-content I solved it by targeting #bricks-site-wrapper by adding the CSS
#bricks-site-wrapper {
min-height: 100vh;
}
to Bricks > Settings > Custom Code > Custom CSS (in Wordpress Admin panel).
The footer seem to already stay at the bottom of the #bricks-site-wrapper so just adding the CSS above solved the issue by itself. Maybe it was different in older versions of Bricks.
Please note that when logged in to Wordpress as admin the admin bar thatâs visible when viewing the site on the frontend will push the footer further down so a page that is less than 100vh will be 100vh + the height of the admin bar. This wonât be an issue for most visitors of a site in a normal use case though so the solution above is good enough for me at least.
I personally think this should be added by default. Without the CSS above the footer is already down at the bottom both when editing and previewing a page in the Bricks Builder editor but not when viewing it on the frontend. So the expected behaviour should be that it acts the same on the frontend, in my view at least.
hi there. if you want the footer to stick to the bottom try this option,
but if you want the footer to stay at the bottom and as you scroll it shows up then create
a container and add height: 100VH VH mean Vertical height(mening it will cover the whole scroon height from top to bottom).
in this example the footer has a class of footer
and if you see the style specify the fixed position on the css properties.
and if you want to display your menu, content, and footer then you do like this. This is just an example
lets say
the screen is 100 vh right
then you can create a header 0f 10vh (where logo navigation and contact button may go)
container of 80vh (all the info for the page will go)
and footer of 10vh (is where anything you want to add for example the copyright section and so on)
that will give you a total of 100vh
This will always keep the footer pinned to the bottom of the screen. it will set the body min-height to 100% and especially useful: if there are other elements like e.g. your gdpr-cookie-script-button or a popup at the same level, those will not be effected or disturbe layout.