place a text as a overlay on a image vertically aligned to top left in a div - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text Alignment

Description

place a text as a overlay on a image vertically aligned to top left in a div

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">
.grid {<!--  www .  j  av a2s  . c  om-->
   display:block;
   width:100%;
}

.block {
   width:255px;
   height:255px;
   border:2px solid Chartreuse;
   margin:13px;
   float:left;
   position:relative;
   transform:rotate(91deg);
}

.badge {
   position:absolute;
   top:231px;
   left:0;
}
</style> 
 </head> 
 <body> 
  <div class="grid"> 
   <div class="block"> 
    <div class="badge">
      Lorem 
    </div> 
   </div> 
   <div class="block"> 
    <div class="badge">
      Lorem 
    </div> 
   </div> 
   <div class="block"> 
    <div class="badge">
      Lorem ipsum d 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials