Jump to content

Widht is too large !!!


slickeddy
 Share

Recommended Posts

Hiin a css site i'm making (using DW MX 2004) the <div id="wrappercontent"> is set to 100% but still he is larger then a browser window.I presume that it has something to do with the fact that the position is set to absolute and 'left' is set to 253px. But i don't know how to solve this. CSS is kinda new to me :-/If you take a look at http://www.bnr.be/new/nl/basis.htm everything should be clear i think.Can someone help me with this problem?grtzEddy

Link to comment
Share on other sites

When you set width to a percentage, you are setting it as a percentage of the parent container. So if you have this:<body> <div></div> <div></div></body>Then the parent of the div is the body. So setting the width of the div to 100% makes the div 100% of the width of the body. If you set the widths of both of those divs to 100%, then the page will actually be twice the width of the screen. Since in your page you have a div on the left set to 253, and then another one set to 100%, the actual page is 100% + 253 pixels wide, so it's always 253 pixels larger than the screen size. Maybe someone else can give you an idea on how to make your div fill the rest of the screen, but a short term fix is to make the div on the right 600px instead of 100% or something, give it a fixed size. Then at least you know how big it is.

Link to comment
Share on other sites

as a minor correction to justsomeguy's post...the effects of the various settings are only cumulative in nested divs...for example:<div></div><div><div/>will not have a cumulative effect.but:<div> <div></div><div>will.also, you may want to avoid specifying pixels for large containers as you do not know the screen resolution of those who will be visiting your site. probably better to use % in most cases unless it will be small enough to not create a problem regardless of the screen resolution of a visitor.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...