Grow your CSS skills. Land your dream job.

Is opacity: .5 equals opacity:0.5 for all browsers

  • # November 13, 2012 at 4:12 pm

    Is opacity: .5 equals opacity:0.5 for all browsers?
    Also i have saw some developers using this on rgb/rgba styles like the following
    background-color:rgba(255,0,0, .3); instead background-color:rgba(255,0,0, 0.3);

    I tried to use this for other styles like height: .5em instead of height: 0.5em and it works.
    Anyway my question is about how valid is this markup and is there any chance some browsers (like ie) NOT to understand that and crush the site.
    10x in advance!

    # November 13, 2012 at 4:15 pm

    I believe IE (below 9) won’t recognize rgba but there might be an IE specific filter to do the same thing.

    # November 13, 2012 at 5:08 pm

    @redhornet It is always okay—and perfectly valid—to use .5 instead of 0.5, etc.

    # November 14, 2012 at 2:50 am

    10x joshuanhibbert, that was what I asking for

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

You must be logged in to reply to this topic.

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