I've go an html from frontend developers. Part of the menu looks like the following:
<ul id="subNav">
<li><a href="#">Menu item 1</a></li>
<li><a href="#">Menu item 2</a></li>
</ul>
I had to add some programming tags, and to make code easier to read I've changed it to:
<ul id="subNav">
<li>
<a href="#">Menu item 1</a>
</li>
<li>
<a href="#">Menu item 2</a>
</li>
</ul>
After my change, the menu is broken. Space between elements are smaller. I have compared computed css and they look the same. Why is that? Why 'enter' between <li>
and <a>
break the layout?
Tested on Chrome.
EDIT: Fiddle: http://jsfiddle.net/bqyjL6rf/