為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

website beancarclub.org.uk loads OK on Safari but 2 of the pages have overlapping text /photos on firefox

  • 2 回覆
  • 2 有這個問題
  • 5 次檢視
  • 最近回覆由 cor-el

more options

We have tried altering the offending pages and keeping text and pictures in separate boxes but they just come out with overlaps in different places. Site appears fine, then when published the faults appear.

We have tried altering the offending pages and keeping text and pictures in separate boxes but they just come out with overlaps in different places. Site appears fine, then when published the faults appear.

被選擇的解決方法

Hi,

I can see this occurring on http://beancarclub.org.uk/Short-Bean-Car-History/ . I believe what's happening here is that Chrome and Firefox are calculating the line height of the paragraphs differently. The space between the lines is set to be 16.9px; Firefox rounds that up to 17px, while Chrome rounds it down to 16px. This causes the paragraphs to be shorter in Chrome, meaning that they don't overlap with the images below.

There are several things you could do to fix this, although if you're using some kind of software to generate the site I'm not sure how many of these are possible:

  1. Change the images so that they always appear after the paragraph, rather than a certain distance from the top of the page (which is what they are doing right now).
  2. Pick an integer (either 16.0 or 17.0px) for the line-height, so that the paragraphs are the same height in both browsers.

Hope that helps!

從原來的回覆中察看解決方案 👍 1

所有回覆 (2)

more options

選擇的解決方法

Hi,

I can see this occurring on http://beancarclub.org.uk/Short-Bean-Car-History/ . I believe what's happening here is that Chrome and Firefox are calculating the line height of the paragraphs differently. The space between the lines is set to be 16.9px; Firefox rounds that up to 17px, while Chrome rounds it down to 16px. This causes the paragraphs to be shorter in Chrome, meaning that they don't overlap with the images below.

There are several things you could do to fix this, although if you're using some kind of software to generate the site I'm not sure how many of these are possible:

  1. Change the images so that they always appear after the paragraph, rather than a certain distance from the top of the page (which is what they are doing right now).
  2. Pick an integer (either 16.0 or 17.0px) for the line-height, so that the paragraphs are the same height in both browsers.

Hope that helps!

more options

I need to switch to zoom text only and slightly zoom out (95%) to make the text appear properly. You need to avoid specifying the top and left position for each element exactly when text is involved since you can't predict what font a visitor or browser is using. All DIV containers are in some random order: the Bean text is #wb_element_instance46 and the image under it is #wb_element_instance30. It is always best to let the browser calculate the height of text containers.