Jump to content

I want foot to always stay at bottom of browser


linux1880

Recommended Posts

It depends - are you looking for a footer that will be at the bottom of the screen if you don't have enough content to push it down, and below the content if the content is larger than the screen? Or are you looking for one that will always be on the bottom of the screen no matter how much content and no matter how much you scroll?

  • 2 weeks later...
  Quote

Hello guys,

 

I want footer to always stay at bottom of browser, how do i do that in css ?

 

if you have main div, create another div with class footer (inside main div). give to main div position:relative;

after, give to footer div position:absolute; bottom:0;

 

something like this

 

<html>
<body>
<div style="width:800px; height:800px; position:relative; background:#ccc;">
<div style="width:800px; height:50px; position:absolute; bottom:0; background:#000;">sss</div>
</div>
</body>
</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.