set only vertical padding - HTML CSS CSS Property

HTML CSS examples for CSS Property:padding

Description

set only vertical padding

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">
#ul1 {<!--from  ww w  .  ja  va2s .  co  m-->
   background-color:Chartreuse;
}

#ul2 {
   background-color:yellow;
}

ul
 {
   padding-top:21px;
   padding-bottom:21px;
}
</style> 
 </head> 
 <body> 
  <ul id="ul1"> 
   <li>Lorem </li> 
   <li>Lorem i</li> 
   <li>Lorem i</li> 
  </ul> 
  <ul id="ul2"> 
   <li>Lorem </li> 
   <li>Lorem i</li> 
   <li>Lorem i</li> 
  </ul>  
 </body>
</html>

Related Tutorials