Padding on the sides for multiline link background - HTML CSS CSS Property

HTML CSS examples for CSS Property:background

Description

Padding on the sides for multiline link background

Demo Code

ResultView the demo in separate window


<html>
 <head> 
  <style>

.greenbox {width:500px; height:200px; position:relative; background:green}
.greenbox > a {
   font: 50px sans-serif;
   line-height: 1.4;
   padding-left: 20px;
   position: absolute;
   left: 0;
   bottom: 60px;
   text-decoration: none;<!--   w  w  w.j a  v a 2  s  .c  o  m-->
   color: #fff;
}
.greenbox > a > span {
   background: #000;
   box-shadow: -10px 0px 0 #000, 10px 0px 0 #000;
}

      </style> 
 </head> 
 <body> 
  <div class="greenbox"> 
   <a href="#"> <span> The Title Goes Here, with overflow </span> </a> 
  </div>  
 </body>
</html>

Related Tutorials