Positioning <p> and <h1> in panel - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Positioning <p> and <h1> in panel

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">
.hbox<!--from www  .  j  a va 2 s .com-->
 {
   margin-top:16px;
   width:301px;
   height:71px;
   -webkit-box-shadow:0 2px 6px Chartreuse, 0 0 5px rgba(0, 0, 0, 0.2) inset;
   -moz-box-shadow:0 2px 6px yellow, 0 0 5px rgba(0, 0, 0, 0.2) inset;
   box-shadow:0 2px 6px blue, 0 0 5px rgba(0, 0, 0, 0.2) inset;
   position:relative;
}

.hbox p {
   top:-9%;
   left:56px;
   padding-bottom:7px;
   font-size:13px;
   color:pink;
   text-shadow:OrangeRed 0px 0px 2px;
   position:absolute;
}

.hbox h3 {
   font-size:46px;
   color:grey;
   text-shadow:BlueViolet 0px 2px 3px;
   position:absolute;
   left:11px;
   top:-61px;
}
</style> 
 </head> 
 <body> 
  <div class="hbox"> 
   <h3>L</h3> 
   <p>Lorem ipsum dolor sit <br>Lorem ipsum dolor s</p> 
  </div> 
  <div class="hbox"> 
   <h3>L</h3> 
   <p>Lorem ipsum dolor si</p> 
  </div>  
 </body>
</html>

Related Tutorials