Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

  1. Coffee
  2. Tea
  3. Milk

asfdasdfasdfadf

How to remove above and below spaces in Order list

like image 469
Tree Avatar asked Dec 28 '22 06:12

Tree


2 Answers

Using css:

ol  {
  margin-top: 0px;
  margin-bottom: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
}
like image 64
Karel Petranek Avatar answered Dec 30 '22 20:12

Karel Petranek


remove the padding and margin:

ol {
  margin: 0;
}
like image 36
KARASZI István Avatar answered Dec 30 '22 22:12

KARASZI István