I'm having some troubles with width in CSS
Posted: Tue Sep 01, 2009 11:00 pm
I have been setting a lot of my blocks to a width of 100% so it can stretch to fit the whole screen. But I have a problem with setting with to 100% inside a block that's already set to 100%. As shown in this picture:

Code here for the blue header (General settings):
Should I just set the width to auto?
EDIT: Just set width to auto and everything seems to be fine. Why doesn't setting it to 100% work?

Code here for the blue header (General settings):
Code: Select all
#block-header{
-moz-border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-webkit-border-radius: 10px;
background-color:#D7FFFF;
border:1px solid #7FF;
color:#06F;
height:auto;
margin:5px;
padding:3px;
width:100%;
}EDIT: Just set width to auto and everything seems to be fine. Why doesn't setting it to 100% work?