Add Border to the div through the Header in the middle of border line - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Header

Description

Add Border to the div through the Header in the middle of border line

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">

.box {<!--   w  ww  .  ja v a 2s  .c  om-->
   margin: 50px;
   width: 400px;
   height: 200px;
   border: 1px solid black;
}
.box > h3 {
   position: absolute;
   background: white;
   height: 20px;
   margin-top: -12px;
   margin-left: 10px;
   padding: 0 10px;
}


      </style> 
 </head> 
 <body> 
  <div class="box"> 
   <h3>title</h3> 
  </div>  
 </body>
</html>

Related Tutorials