Min-width
Another bug in IE is that it doesn�t support min-width. Min-width is extremely useful,
especially for flexible templates that have a width of 100%, as it tells the browser
to stop contracting.
For all browsers apart from IE6 all you need is min-width:Xpx;. e.g.:
.container
{
min-width:300px;
}
Getting this to work in IE6 takes some extra effort! To start you will need to create
2 divs, one embedded in the other.
<div class="container">
<div class="holder">Content</div>
</div>
Then you will need the min-width which goes on the outer div.
.container
{
min-width:300px;
}
Now this is where the IE hack comes into play. You will need to include the following
* html .container
{
border-right: 300px solid #FFF;
}
* html .holder
{
display: inline-block;
position: relative;
margin-right: -300px;
}
As the browser window is resized the outer div width reduces to suit until it shrinks
to the border width, at which point it will not shrink any further. The holder div
follows suit and also stops shrinking. The outer div border width becomes the minimum
width of the inner div.