user2845065
user2845065

Reputation: 11

How to make a div remain at the bottom of the page

I would like to put a small tab at the bottom of the page for Contact Us- that should scroll as the page scrolls and should work in Older versions of IE also like IE 5.0. Please see the page at http://www.goshti.com/testcode.html

Any suggestions on how to solve this. I CSS or Javascript solution is both fine.

Upvotes: 1

Views: 67

Answers (2)

GHoStyaiRo
GHoStyaiRo

Reputation: 100

Have you tried position:fixed? I'm not sure if it would work on older browsers tho.

You can wrap the bar within a relative div

#page-wrap { 
margin: 15px auto; 
position: relative; 
}

#bar {
position: fixed; 
bottom: 0px;
right: 0px;
}

Upvotes: 0

Samuel Liew
Samuel Liew

Reputation: 79032

You can use position:fixed on the element.

<body>
    <div class="tab">
        <a href="/contact-us">Contact Us</a>
    </div>

CSS:

.tab {
    position: fixed;
    bottom: 0px;
    right: 0px;
}

Upvotes: 1

Related Questions