开发者

IE6/7 literally interpret whitespace in list items

开发者 https://www.devze.com 2023-01-18 16:10 出处:网络
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 wou

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?

IE6/7 literally interpret whitespace in list items

<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>
0

精彩评论

暂无评论...
验证码 换一张
取 消