Jump to content

Opacity Help


herghost

Recommended Posts

Hi All,

 

I have a problem where I cant get anything in a wrapper div appearing without opacity(ie normal)

 

This is my css:

 

@charset "utf-8";
/* CSS Document */

body
{
margin:0;
padding:0;
background-image:url(../images/mainbg.png);
background-repeat:repeat-x;
}


#wrapper
{
min-height:400px;
width:850px;
margin:0 auto;
margin-top:35px;
background-color:#FFF;
opacity:0.5;
-moz-border-radius: 45px;
border-radius: 45px;
}

#header
{
opacity:1;


}

 

and my html

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Site Title</title>
<link href="style/main.css" rel="stylesheet" type="text/css" />
</head>


<body>

<div id="wrapper">
<div id="header">
    	<img src="images/header.png" />
  	</div>
</div>
</body>
</html>

basically the wrapper should be half transparent, but the header div should be as normal?

 

Cheers

 

 

Link to comment
https://forums.phpfreaks.com/topic/237355-opacity-help/
Share on other sites

they easiest way is to have a semi transparent .png (1x1pixel) and some javascript  for ie6 and lower to support the semi transparency. just google for ie png fix javascript and some script should pop up. ie7 and later support transparent png's so make sure you use conditional comments for ie6 and lower.

Link to comment
https://forums.phpfreaks.com/topic/237355-opacity-help/#findComment-1219707
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.