Jump to content

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...

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>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.