Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Push Div to bottom of page

Tags:

I want the footer to always be at the bottom of the page even if the content doesn't push it all the way down. How can I make it just stay at the bottom of the page?

like image 507
FrozenMicrowavedPIzza Avatar asked Jan 26 '10 16:01

FrozenMicrowavedPIzza


People also ask

How do you push a div to the bottom of the page?

Set the position of div at the bottom of its container can be done using bottom, and position property. Set position value to absolute and bottom value to zero to placed a div at the bottom of container.

How do you get an element to stick to the bottom of a div?

Just set element child to position: relative and than move it top: 100% (that's the 100% height of the parent) and stick to bottom of parent by transform: translateY(-100%) (that's -100% of the height of the child).

How do I position something at the bottom of a page in CSS?

If position: absolute; or position: fixed; - the bottom property sets the bottom edge of an element to a unit above/below the bottom edge of its nearest positioned ancestor. If position: relative; - the bottom property makes the element's bottom edge to move above/below its normal position.


1 Answers

 #footer { position: fixed; bottom: 0; } 
like image 56
Bryan A Avatar answered Oct 04 '22 05:10

Bryan A