How do you get Internet Explorer 6 and 7 to not literally interpret whitespace and line breaks in HTML list items? In the image below, I have marked the开发者_JS百科 undesired whitespace in red. I would prefer to not squeeze everything into one giant line of code. It's very hard to read that way. Is there a CSS alternative?
<ol>
<li>
<img>
Sentence 1
Sentence 2
</li>
<li>
<img>
sentence
</li>
<li>
sentence
</li>
</ol>
Here is some useful information Closing gaps in ie
Use a different browser? haha, but in all seriousness, i would suggest just formatting your code to show it properly. Perhaps encapsulating the sentances in spans could do it
<ol>
<li>
<img>
<span>Sentence 1</span>
<span>Sentence 2</span>
</li>
<li>
<img>
<span>sentence</span>
</li>
<li>
<span>sentence</span>
</li>
</ol>
精彩评论