Solid text on transparent div on image - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text

Description

Solid text on transparent div on image

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.address {<!--from   w ww  .j a v  a2s.  co  m-->
   height:21px;
   width:inherit;
   background:Chartreuse;
   font-family:Helvetica;
   color:yellow;
   text-align:center;
   z-index:501;
   position:absolute;
   top:0px;
   left:0px;
   padding-top:6px;
}

span.l {
   width:51%;
   font-family:Helvetica;
   color:blue;
   text-align:center;
   font-size:76%;
   float:left;
}

span.r {
   width:51%;
   font-family:Helvetica;
   color:pink;
   text-align:center;
   font-size:76%;
   float:right;
}

.desc {
   width:inherit;
   background:OrangeRed;
   height:21px;
   z-index:501;
   position:absolute;
   bottom:0px;
   left:0px;
   padding-bottom:0px;
   padding-top:4px;
}

.item img {
   width:251px
}

.item {
   position:relative;
   width:251px;
   margin:auto;
   padding:0px;
   -moz-box-shadow:0px 0px 2em grey;
   -webkit-box-shadow:0px 0px 2em BlueViolet;
   box-shadow:0px 0px 2em Chartreuse;
   filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=11px, OffY=11px, Color='yellow');
   -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=11px, OffY=11px, Color='blue')";
}

body {
   background-color:pink;
}
</style> 
 </head> 
 <body> 
  <div class="item"> 
   <div class="address"> 
    <span>Lorem ips</span> 
   </div> 
   <img src="https://www.java2s.com/style/demo/Firefox.png"> 
   <div class="desc"> 
    <span class="l">Lorem ipsu</span> 
    <span class="r">Lorem</span> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials