Pure CSS IE6 Min-width


/ Published in: CSS
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.