No replies
jimeast's picture
Boulder Creek
Last seen: 4 years 22 weeks ago
Boulder Creek
Timezone: GMT-7
Joined: 2011-12-25
Posts: 5
Points: 8

I have this code I use to demonstrate alpha in rgba it simply had 2 divs with different background colors overlaying some h1 text and each other it works fine with absolute positioning but I would prefer to this or something very similar without absolute positioning.

<!document html>
<html lang="en">
<meta charset="utf-8" />
<title>rgba example</title>
h1 {position:absolute; top:20px;}
div#wrapper {position:relitive;}
div#red {background-color:rgba(255, 0, 0, 0.5);position:absolute; top:20px; left:20px; width:200px; height:100px;}
div#green {background-color:rgba(0, 255, 0, 0.5);position:absolute; top:20px; left:120px; width:200px; height:100px;}
<div id="wrapper">
<div id="red"></div> <div id="green"></div>
<h1>"Three shall be the number thou shalt count and the number of the counting shall be three" </h1>