Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Oct 2007
    Posts
    148
    Thanks
    4
    Thanked 4 Times in 4 Posts

    To validate, or not to validate...

    So, I can choose one of the following options, post your opinion on which one I should take:

    Use fully validated CSS with a PNG with alpha opacity, that looks like crap in IE.

    Use invalid CSS by tossing out the PNG's, and using

    Code:
    filter:alpha(opacity=70
    opacity:0.7;
    which works perfectly in both IE and FF, but doesn't validate.


    I'm all for having fully valid code, but I'd like the page to look good in both IE and FF, and haven't had much luck with the PNG hacks so far. :/

    Which one should I use? :)

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Stick the styles for IE in an a stylesheet of their own and put this in between your head tags
    Code:
    <!--[if lte IE 6]>
    <link rel="stylesheet" href="iestyle.css" type="text/css">
    <![endif]-->
    Opacity is valid in CSS 3 so when you validate you should validate with the CSS 3 profile.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    Aceramic (10-25-2007)

  • #3
    Regular Coder
    Join Date
    Oct 2007
    Posts
    148
    Thanks
    4
    Thanked 4 Times in 4 Posts
    lol... Apperently, the
    Code:
    filter:alpha(opacity=70);
    part is unnecessary... o.0

    It validates now (using CSS 3.0). Thanks.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    IE6 doesn't support the opacity property so it is still necessary for IE6.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •