ol, ul {margin-left: 0; padding-left: 2.5em;} : li padding « Tags « HTML / CSS






ol, ul {margin-left: 0; padding-left: 2.5em;}

   



<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css" media="all">
ol, ul {background: #787;}
.one {margin-left: 0; padding-left: 2.5em;}
.two {margin-left: 1.5em; padding-left: 1em;}
.three {padding-left: 0; margin-left: 2.5em;}
</style>
</head>
<body>

<ol class="one">
<li>Introduction</li>
<li>Premises</li>
<li>Problem</li>
<li>Various Solutions</li>
<li>Conclusion</li>
</ol>

<ol class="two">
<li>Introduction</li>
<li>Premises</li>
<li>Problem</li>
<li>Various Solutions</li>
<li>Conclusion</li>
</ol>

<ol class="three">
<li>Introduction</li>
<li>Premises</li>
<li>Problem</li>
<li>Various Solutions</li>
<li>Conclusion</li>
</ol>

</body>
</html>

   
    
    
  








Related examples in the same category

1.LI padding: .3em 0
2.Using padding to control the list item indent
3.li padding: .3em 0 1em 40px;