DIV + CSS: Fix min-width bugs in IE

min-width does not work in well IE, even with IE7 and set DOCTYPE to strict. I did not get it work. Also I donot want to use expression due to its performance. It will kill your brower. After google I found a better solution, it using pure div + css. the link is "How to Use CSS to Solve min-width Problems in Internet Explorer". It works find with only 1 div in a page. But does not work for my case. Finally I came out my own idea. Below is my solution for fixing min-width IE Bug.

Html Code:

<div class="c_container">
    
<div class="c_content">
         You content here
        
<div class="c_minwidth"></div>
    
</div>
</div>

Css Styles:

.c_container { min-width: 300px; } /* works for FF */
.c_minwidth
{width: 300px;height:1px;font-size:1px;} /* fix for IE min-width bug */
 
Post Rating

Comments
Only registered users may post comments.
Subscribe
Rss Feed Email Follow Us on Twitter
Search