<html>
<body>
sdadfasdf a
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
asfdasdfasdfadf
</body>
</html>
Output is
sdadfasdf a
- Coffee
- Tea
- Milk
asfdasdfasdfadf
How to remove above and below spaces in Order list
<html>
<body>
sdadfasdf a
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
asfdasdfasdfadf
</body>
</html>
Output is
sdadfasdf a
asfdasdfasdfadf
How to remove above and below spaces in Order list
Hi
Because each browser usually adds paddings, border and margins as a default to all tags, try this css:
html,body,div,p,h1,h2,h3,h4,h5,h6,address,blockquote,code,
ul,ol,li,dt,dl,dd,form,fieldset,hr,table,caption,tr,tbody,
td,tfoot,th,thead,img,object,sub,sup,big,small {
margin: 0;
padding: 0;
border: 0;
}
This should reset everything to 0, including white spaces. And you can move and place your elements with your own rules and laws.
Using css:
ol {
margin-top: 0px;
margin-bottom: 0px;
padding-top: 0px;
padding-bottom: 0px;
}