Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Learn More

Firefox renders differently from Safari

  • 2 отговора
  • 5 имат този проблем
  • 11 изгледи
  • Последен отговор от GilDawson

more options

I have a little html code that produces two similar paragraphs. The only structural difference in the two paragraphs is

a line-end appears in the second paragraph between the two /font tags.

I expected the line-end to be treated as white space and ignored. It is ignored in Safari Version 5.0.2 (6533.18.5), but it is not ignored in Firefox (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12).

When rendered in Firefox, the second line in the second paragraph appears just a little bit lower below its first line than in the first paragraph.

Here's the html (How can I get it not to render?):

<html>
<head>
</head>
<body>
<p><font face="Arial">This is the 1st line in the 1st paragraph.<br />
<font size="2">This line is just below it.</font></font></p>
<p><font face="Arial">This is the 1st line in the 2nd paragraph.<br />
<font size="2">This line renders lower in Firefox.</font>
</font></p>
</body>
</html>


--Gil

I have a little html code that produces two similar paragraphs. The only structural difference in the two paragraphs is a line-end appears in the second paragraph between the two /font tags. I expected the line-end to be treated as white space and ignored. It is ignored in Safari Version 5.0.2 (6533.18.5), but it is not ignored in Firefox (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12). When rendered in Firefox, the second line in the second paragraph appears just a little bit lower below its first line than in the first paragraph. Here's the html (How can I get it not to render?): <pre><nowiki> <html> <head> </head> <body> <p><font face="Arial">This is the 1st line in the 1st paragraph.<br /> <font size="2">This line is just below it.</font></font></p> <p><font face="Arial">This is the 1st line in the 2nd paragraph.<br /> <font size="2">This line renders lower in Firefox.</font> </font></p> </body> </html></nowiki></pre> --Gil

Променено на от cor-el

Избрано решение

A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.

The helpers at that forum are more knowledgeable about web development issues.

You need to register at the mozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25

Прочетете този отговор в контекста 👍 1

Всички отговори (2)

more options

Избрано решение

A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.

The helpers at that forum are more knowledgeable about web development issues.

You need to register at the mozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25

more options

Cor-el--

Thanks for the lead, and thanks also for showing me the tag. --Gil