Create a vertical line with text in the middle - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Text

Description

Create a vertical line with text in the middle

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<!--from   www.ja va  2 s . c  o m-->
 {
   height:31px;
   float:left;
   margin-left:11px;
   border:0px solid Chartreuse;
   width:2px;
   border-left-width:3px;
}
</style> 
 </head> 
 <body> 
  <div class="line"> 
  </div> 
  <div style="clear:both;"></div> 
  <div>
    OR 
  </div> 
  <div class="line"> 
  </div> 
  <div style="clear:both;"></div>  
 </body>
</html>

Related Tutorials