Posted By

Ahrjay on 09/17/09


Tagged

css ie6 min-width


Versions (?)

Who likes this?

9 people have marked this snippet as a favorite

wizard04
arunpjohny
visualife
Merstzik
timostone
tigr
codesniper81
ljayz
alp


Pure CSS IE6 Min-width


 / Published in: CSS
 

URL: http://www.thecssninja.com/xhtml/ie6-min-width-solutions

Accomplish min-width in IE6 using CSS and conditional comments, no need for expressions.

  1. .min_width
  2. {
  3. min-width: 500px; /* For good browsers */
  4. }
  5. * html .min_width
  6. {
  7. padding: 0 250px;
  8. }
  9. /* This is for the markup that only appears in IE6 thanks to conditional comments */
  10. .min_width .min_width_inner
  11. {
  12. width: 100%; /* gives the element hasLayout */
  13. }
  14. .min_width .min_width_container
  15. {
  16. margin: 0 -250px;
  17. position: relative; /* Fixes negative margin bug */
  18. float: left;
  19. }

Report this snippet  

You need to login to post a comment.