Grow your CSS skills. Land your dream job.

Conditional CSS Problem

  • # March 6, 2009 at 9:58 am

    Hello,

    For some reason I am having a problem conditional CSS I write for specific browsers (IE 6 and 7) and some of the styling is changing in Firefox and Safari.

    Here is my head:

    Code:


    And here are the rules in the CSS that are in the IE6 style sheet that are carrying over

    Code:
    #videoInfo {width:224px; -moz-border-radius:10px; -webkit-border-radius: 10px; border-radius: 10px; background:#ffffff; filter:alpha(opacity=20); repeat; position:relative; z-index:9999;}

    #videoInfo p {filter:alpha(opacity=100); color:#000;}

    And here is what I want Safari, Firefox and any other non-piece of crap browser to use.

    Code:
    #videoInfo {width:224px; -moz-border-radius:10px; -webkit-border-radius: 10px; border-radius: 10px; background:url(images/moreInfo-BG.png) repeat; position:relative; z-index:9999;}

    #videoInfo p {padding: 10px 10px 5px 10px; color:#ffffff;}

    What am I doing wrong-o? Probably just a small mistake.

    # March 6, 2009 at 11:18 am

    It appears that you actually have mozilla and safari specific code in your IE conditional css. I would start with getting the code right for Firefox and Safari and then only modify what is necessary in the IE conditional code.

    # March 6, 2009 at 12:34 pm

    I was aware that it was there and it shouldn’t recognize the -moz and -webkit attributes. My problem is that Safari, Firefox and IE7 are inheriting the the png fix that I’m trying to use on the IE 6 style sheet.

    # March 6, 2009 at 12:42 pm

    Never mind…. dumb mistake I was appending them to my index file with a @import call which were overriding the styles.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".