treehouse : what would you like to learn today?
Web Design Web Development iOS Development

image transparency help

  • I'm having a problem with the images taking the opacity from the wrapper div. Could someone bale me out of this one? You can view the site here:jltjr(dot)com/studiocarvel/ My wrapper css follows ~Thanks, JT

    HTML and CSS Syntax

    .wrapper{
    width:960px;
    margin:0 auto;
    background-color:#000033;
    line-height:1.5em ;
    padding:15px 3px 15px 15px;
    left:50%;
    right:50%;
    -moz-opacity:0.90;
    -khtml-opacity:0.90;
    -webkit-opacity:0.90;
    filter:alpha(opacity=90);
    opacity:0.75;
    -webkit-box-shadow: 0 15px 20px rgba(0, 0, 0, 0.8);
    -moz-box-shadow: 0 15px 20px rgba(0, 0, 0, 0.8);
    -box-shadow: 0 15px 20px rgba(0, 0, 0, 0.8);
    -khtml-shadow: 0 15px 20px rgba(0, 0, 0, 0.8);
    border-top:1px solid #181001;
    border-left:1px solid #181001;
    border-right:1px solid #181001;
    border-bottom:1px solid #181001;
    background-color: #000033;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#000033), to(#000000));
    background-image: -webkit-linear-gradient(top, #000033, #000000);
    background-image: -moz-linear-gradient(top, #000033, #000000);
    background-image: -ms-linear-gradient(top, #000033, #000000);
    background-image: -o-linear-gradient(top, #000033, #000000);
    background-image: linear-gradient(top, #000033, #000000);
    filter: progid: DXImageTransform.Microsoft.gradient(startColorStr='#000033', EndColorStr='#000000');
    border-radius: 15px;
    -moz-border-radius: 15px;
    -webkit-border-radius: 15px;
    -moz-background-clip: padding;
    -webkit-background-clip: padding-box; background-clip: padding-box;
    }
  • opacity changes the entire element and its contents
    If you would like to have a semi transparent background but Opaque contents use rgba
    so your background of #000033 and opacity or 0.9 would become
    background: rgba(0,0,51,0.9);
  • or else you can use a 2x2 px of semi-transparent background image and repeat in css for background wrapper. This may solve your issue.