Log in

View Full Version : 100% width



lord22
10-06-2009, 10:18 AM
Hi,

My site is 1000px width.
I have one div in my site that should be spread all over the screen width,
so I gave it:
width: 100%;

However, on 800*600 resolution (tested on IE7)
the div's background is only 800px and not 1000px

I've also tried to use min-width:1000px, but it didn't work.

Any suggestions?

Thanks! :)

monicasaha
10-06-2009, 10:45 AM
If u don't mention any width attribute then it can also take 100% width.
But it would be better to replay if I can see ur code.

lord22
10-06-2009, 12:29 PM
Thank you, but it didn't fix it. I removed the 100% width, but it didn't change a thing.

simcomedia
10-06-2009, 03:12 PM
Post your code, please :)

traq
10-07-2009, 03:56 AM
My site is 1000px width.
I have one div in my site that should be spread all over the screen width...

So....

do you want your div the full width of the site, or the full width of the screen? These are two different measurements. If you want the div the full width of the site, make it 1000px. If you want it the full screen width, make it 100% (and, as you noted, the exact pixel width will vary depending on browser window size).