HTML CSS examples for CSS Property:padding
set only vertical padding
<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>