Dz.slick
Dz.slick

Reputation: 445

CSS footer width issue

I'm currently working on this site and I want the footer to be 100% (width) of the screen but it has refused to respond no matter what I do. I've checked to see if the ID has a duplicate but I saw nothing. The CSS code is as shown below:

#footer {
    width: 100%;
    clear: both;
    height: 400px;
    background-color: #293D61;
}

Upvotes: 0

Views: 72

Answers (3)

Anoop
Anoop

Reputation: 993

Check whether your footer is is in inside some other div...? if so then it will not be of full page length....

Upvotes: 0

VajNyiaj
VajNyiaj

Reputation: 1810

Your footer is a nested div inside #rack. At 100%, your footer will only be as wide as your outer/parent div. You need to move it out of the parent div and make it a sibling

Upvotes: 4

itsme
itsme

Reputation: 575

Try doing it this way,

#footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    clear: both;
    height: 400px;
    background-color: #293D61;
}

Upvotes: 0

Related Questions