HTML CSS examples for CSS Layout:Responsive Layout
get code a text overlay and image to be responsive
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #thisbanner {<!--from w w w . j a v a 2s . c om--> max-width:701px; } h1 { position:absolute; display:block; width:81%; margin-top:-13%; max-width:611px; font-size:5vw; font-family:'Roboto Slab', Rockwell, Serif; font-weight:bold; color:Chartreuse; text-shadow:0 .126em .126em yellow; padding:.7em 2em .7em 2.8em; background:linear-gradient(to right, blue 0%, rgba(170, 33, 33, 0.9) 6%, rgba(161, 31, 31, 2) 51%, rgba(153, 30, 30, 0.9) 76%, rgba(179, 35, 35, 0) 100%); } </style> </head> <body> <div id="thisbanner"> <div class="interior-header img"> <div class="headerimage"> <img src="https://www.java2s.com/style/demo/Firefox.png" width="630" height="240" alt="Traffic Control"> <h1>Lorem ipsum dol</h1> </div> </div> </div> </body> </html>