Fri, 2013-11-22 19:41
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"> <head> <meta charset="utf-8" /> <title>rgba example</title> <style> 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;} </style> </head> <body> <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> </div> </body> </html>