Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS transparency.. why oh why

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #36028
    mikeman
    Member

    :)
    So iv found the transparency pages here on css but its to split for me to peace together.. i find the css, i copy and paste, then all the content within my div is transparent as well.. then it wont work in IE. but theres an IE fix.. is there a copy paste all in one solution that i can copy and paste into my div element that anyone could provide that covers all grounds such as browser compatibility? fallbacks.. and all that good stuff :-D

    thanks!

    #94308
    TheDoc
    Member
    div {
    background: #000; /* fallback color */
    background: rgba(0,0,0,.5); /* will be black with 50% transparency */
    }
    #94310
    jamygolden
    Member

    It sounds like you’re using the ‘opacity’ css property to add the ‘transparent’ effect. Rather add it to the background of the div:
    http://jsfiddle.net/zVsZB/
    (the weird code is for IE – Check out http://css3please.com/ to generate things like this quickly)

    #94313
    jamygolden
    Member

    If you firebug it, you’ll see that another CSS rule is applying that #eeeeee colour and overriding the rgba values.

    #94372
    jamygolden
    Member

    !important should be before the semi-colon. It should be:

    #content {
    background-color: transparent !important;
    background-color: rgba(0, 0, 0, 0.1) !important; /* FF3+, Saf3+, Opera 10.10+, Chrome, IE9
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#19000000,endColorstr=#19000000); /* IE6–IE9
    zoom: 1;
    }
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.