#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Vancouver, BC, Canada
    Posts
    61
    Rep Power
    11

    Valid CSS options for max-width


    I'm using the max-width in IE in my site - specifically I'm using it to set the minimum height of certain elements. Now that it has become a key part of my design, I realized that it generates errors in the W3 validator.

    Does anyone know a valid way to use the min-height that will work with IE?
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1099
    I'm sure you could use JavaScript as a work-around if that's an acceptable solution.
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Vancouver, BC, Canada
    Posts
    61
    Rep Power
    11
    I hate to admit, but I do not have a strong understanding of JavaScript. I've also tried the IE7 stylesheet from http://dean.edwards.name/IE7/ but it seemed to break my fairly complicated CSS design. I was very disapointed when I realized the max-width in IE trick doesn't pass the validator, but I guess it's not the end of the world. It's a real bummer after working so hard to keep it valid.
  6. #4
  7. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1099
    I know what you mean. M$'s borked things up so much that it's nearly impossible to design a site purely with CSS that actually validates. You have to use so many different work-arounds to handle all the quirks.

    What exactly are you using that isn't valid?
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Location
    Vancouver, BC, Canada
    Posts
    61
    Rep Power
    11
    It's a technique described on this page http://www.svendtofte.com/code/max_width_in_ie/

    This example of the min-height in IE is exactly the code I'm using that will not validate: http://www.svendtofte.com/code/max_w...minheight.html

    Just try to run that last page through the CSS Validator and you can see the error it comes up with.
    http://jigsaw.w3.org/css-validator/v...minheight.html

    Other than this, my entire corporate site validates as XHTML 1.1 Strict with a 3-column CSS-based layout.

IMN logo majestic logo threadwatch logo seochat tools logo