Underline for entire line when using span and position:absolute - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Absolute Position

Description

Underline for entire line when using span and position:absolute

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">
a {<!--   w w w.  ja  v a2s .  com-->
   clear:both;
   position:relative;
   top:95px;
   border-bottom:2px solid Chartreuse;
   left:43px;
   text-decoration:none;
   width:100%;
   -moz-box-sizing:border-box;
   -webkit-box-sizing:border-box;
   -ms-box-sizing:border-box;
   box-sizing:border-box;
}

a span {
   clear:both;
   border-bottom:2px solid yellow;
   margin-left:96px;
}

a span:first-child {
   clear:both;
   border-bottom:2px solid blue;
   margin-left:0px;
}
</style> 
 </head> 
 <body> 
  <p class="sans-serif"> <a href="#"> <span>Lorem</span> <span>Lorem</span> <span>Lorem</span> </a> </p>  
 </body>
</html>

Related Tutorials