HTML CSS examples for CSS Widget:Image Text
display text over an image css
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> body {<!--from w w w. j av a2 s .c o m--> color:Chartreuse; font-size:100%; font-family:'Maven Pro', sans-serif; line-height:2.5em; min-height:100%; background-color:yellow; } .head_img { margin-top:11%; font-size:2.6em; line-height:2em; font-weight:bold; font-style:italic; color:blue; text-align:center; } .head_img p { position:absolute; left:0; width:100%; vertical-align:bottom; top:395px; color:pink; } </style> </head> <body class="body"> <div class="head_img"> <div style="text-align:center;"> <img style="min-width:50%; min-height:60%;" src="https://www.java2s.com/style/demo/Google-Chrome.png"> </div> <p>Lorem ipsum dolor sit amet, consec<br>Lorem ipsum dolor sit amet, consectet<br> </p> </div> </body> </html>