I wanted to make the line tighter in an ordered list. So I just style it - and it is fine. |This style has always worked well for me. Until I add a nested list, and it is not working well. For some reason when I add these two stylings the nested ordered list goes to the bottom of the list. It is no longer nested, nested item is a bottom of list in Edge and Chrome
li {
height: 0px;
width: 0px;
}
<pre>
<ol>
<li> item one </li>
<li> item two
<ol>
<li> nested item one</li>
</ol>
</li>
<li> item three </li>
<li> item four </li>
<li> item five </li>
</ol>
When I take this li styling class away from <style> the list is nested again.
heightandwidthdon't represent the spacing of anything, they represent the actual height and width; so you've said "each item should take up no space at all". That's probably not what you wanted.