Add line through behind title to the middle with border and margin - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Border

Description

Add line through behind title to the middle with border and margin

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <style type="text/css">
h3 {<!--from  ww  w  . jav a2s .  co  m-->
   position: relative;
   border-bottom: 1px solid #ccc;
   font: 20px/1 Serif;
}
h3:before {
   content: "Title";
   position: absolute;
   margin: -10px 0 0 100px;
   background-color: #fff;
   padding: 0 10px;
}

      </style> 
   </head> 
   <body> 
      <h3></h3>  
   </body>
</html>

Related Tutorials