Add offset to border-bottom - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Border

Description

Add offset to border-bottom

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>CSS border styles</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.the-div {<!-- w  w  w  . j  a v  a2 s . co  m-->
   width:501px;
   height:41px;
   background-color:Chartreuse;
   position:relative;
}

.the-div::after {
   border-bottom:3px solid yellow;
   content:'';
   width:501px;
   position:absolute;
   bottom:6px;
}
</style> 
 </head> 
 <body> 
  <div class="the-div"></div>  
 </body>
</html>

Related Tutorials