Cristofori
06-04-2006, 12:25 PM
Howdy -
I'm trying to create a div where the top and bottom margins are always a fixed distance away from the side of the browser window so that it will stretch to fit the window when it is resized.
In Firefox I can do the following
div.xxx
{
position: absolute;
top: 10px;
bottom: 10px;
left: 10px;
width: 100px;
}
which will create a sidebar on the left side, but IE will always shrink the div to the size of whatever contents are in it.
Is there a better way to do what I'm trying to accomplish so that it will work in IE as well?
Thanks!
I'm trying to create a div where the top and bottom margins are always a fixed distance away from the side of the browser window so that it will stretch to fit the window when it is resized.
In Firefox I can do the following
div.xxx
{
position: absolute;
top: 10px;
bottom: 10px;
left: 10px;
width: 100px;
}
which will create a sidebar on the left side, but IE will always shrink the div to the size of whatever contents are in it.
Is there a better way to do what I'm trying to accomplish so that it will work in IE as well?
Thanks!