Apollo
Apollo

Reputation: 9054

Change color after footer

Currently I have a footer at the bottom of my page.

HTML

<div id="footer">
    Contact us: [email protected], +1 (781)-974-9782
</div>

CSS

#footer {
    display: block;
    background: blue;
    padding: 10px;
    color: white;
}

This works fine, however when I try to scroll past the footer, I see white (which is the background of the rest of my page). How would I make the color blue if the user tries to scroll after the footer?

An example of what I'm talking about can be found here: http://support.yikyakapp.com/

Upvotes: 0

Views: 93

Answers (2)

Sachin
Sachin

Reputation: 765

Try this

#footer {
  position: absolute;
  bottom: 0px;
}

Upvotes: 1

chdltest
chdltest

Reputation: 873

Apply a background color to your body tag.

(Example: view the source for this page and change the background color to the body tag to black and try scrolling down, it'll show up as black instead)

Upvotes: 2

Related Questions