Create div above and cover its parent's border - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div

Description

Create div above and cover its parent's border

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">
.line {<!--  ww  w .ja  va 2s .co m-->
   height:11px;
   border-bottom:2px solid Chartreuse;
   text-align:center;
}

.title {
   display:inline-block;
   padding:0 6px;
   background:white;
   margin-top:-3px;
}
</style> 
 </head> 
 <body> 
  <div class="line"> 
   <div class="title">
     Lorem i 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials