Percentage padding inside ul li - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Percentage padding inside ul li

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">
html, body {
   height:100%;
}

ul {<!--from   w  w  w. jav a2s  . c o  m-->
   height:100%;
   list-style:none outside none;
   margin:0;
   padding:0;
   background-color:Chartreuse;
}

ul li {
   height:26%;
   text-align:right;
   width:100%;
}

a {
   display:block;
   position:relative;
   height:100%;
   width:100%;
   background-color:yellow;
}

span {
   display:block;
   position:absolute;
   bottom:0;
   padding:3%;
   width:97%;
   background-color:blue;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li> <a href="#"> <span>Lorem </span> </a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials