Hi
I am having trouble achieving 100% width of footer.
If in css width, I set it to 100%, after resizing or after scrolling page horizontally the footer background is lost.
If I set width in pixel, the problem increases(i am sure u know why)
Do you know any fix that would make my footer 100% at any resolution, and after resizing (down) also.
Thanks
Vinayak

Recommended Answers

All 6 Replies

Please post some code to look at.

Well the code is the usual...
html with div tag having a id="footer"
and a separate css file with

#footer{
    width:100%;
}

its not just with my code i guess. i have seen this "simple little common" problem elsewhere also.
Hope someone gets it.
Apologies if my post is unclear.
Vinayak

The content in the footer is what controls the width. Let's say you want a footer of 1000px. The content on the inside when added together equals 800px. You need to add 200px of empty space. I do this with padding. How much and where I don't know. There are many things that can effect the width here.

The whole thing is a CSS issue from what I can tell and all I can offer is the simplest of advice.

Well the code is the usual...
html with div tag having a id="footer"
and a separate css file with

#footer{
    width:100%;
}

its not just with my code i guess. i have seen this "simple little common" problem elsewhere also.
Hope someone gets it.
Apologies if my post is unclear.
Vinayak

The code supplied is but a tiny smidgen of the overall page,so it's not telling us much.
For example,if that Css is contained within a div of smaller size, then 100% will be whatever the defining div was set to.

thanks for replying, but maybe i should try to explain again.
i simply set the width to 100% (contents inside are not an issue)
if the web page width is 900px and i view it at 800px i have to scroll sideways. now the 100px on the right are empty.
i can not set width to 900px because then again at higher resolutions, width would be less than 100%.
Thanks
Vinayak

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.