Forum Moderators: not2easy
I have a solid blue background color on a web page. Then I have a 800px solid white centered container that is going to hold all my content.
What I want to do is have transparent blue div that while over the white, will be as close to the solid blue page background as I can get it.
Right now I am just eyeballing it. And I would like to know if there is an actual method to figuring this out. I have searched everywhere with no answers.
This is as close as I can get it.
solid blue background = #99ccff
transparent blue over solid white = Opacity 37%, #0099FF
NOTE:
There is no CSS alpha/trans applied. The trans blue is a transparent png image created in illustrator set to 72ppi in RGB color mode (as basic as it gets).
If anyone has a method other than just "eying it", please let me know
You know what is stupid I did that for a site I did a while back. I guess I was just so dead set and concentrating so much on matching the solid (websafe) color, that I forgot it was much easier to do the reverse.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<style type="text/css">
body {
background-color:rgb(153,204,255); /* #99ccff */
}
#container {
width:760px;
padding:60px 0;
margin:auto;
background-color:rgb(255,255,255); /* #ffffff */
}
#div1 {
padding:10px;
background-color:rgb(0,127,255); /* #007fff */
opacity:0.4;
}
</style>
<!--[if IE 6]>
<style type="text/css">
#div1 {
filter:alpha(opacity=40);
zoom:1;
}
</style>
<![endif]-->
</head>
<body>
<div id="container">
<div id="div1">opacity 0.4</div>
</div>
</body>
</html>