HTML CSS examples for CSS Widget:Header
Text behind opaque header background
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> header{<!--from ww w .jav a 2 s . c o m--> width: 100%; position: fixed; top: 0; border: 1px solid #000; z-index: 2; background : rgba(255,255,255,0.5); } ul li{ opacity: 1; } .text{ border: 1px solid #fff; position: relative; margin-top: 150px; z-index: 1; } p{ font-size: 150px; } </style> </head> <body> <div class="container"> <header> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> </header> <div class="text"> <p> Text would go here. And more and more and more and more. </p> </div> </div> </body> </html>