搜尋 Mozilla 技術支援網站

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

Learn More

Why are table buttons in wrong position only on Firefox?

  • 2 回覆
  • 1 有這個問題
  • 38 次檢視
  • 最近回覆由 ormi

more options

at http://aandrroofing.com "project gallery" and "contact us" buttons appear below table background and background top appears below them. Works perfectly on IE and Chrome.

at http://aandrroofing.com "project gallery" and "contact us" buttons appear below table background and background top appears below them. Works perfectly on IE and Chrome.

被選擇的解決方法

Regarding the button positioning: you have a paragraph tag inside those four table cells:

<td>
 <script>... </script>
 <p>... </p>
</td>

Normally, a paragraph element has a top and bottom margin equal to the standard height of a line. Internet Explorer suppresses those margins when they are adjacent to the top and bottom boundaries of a table cell. Firefox does not.

In this case, it would be simplest to delete the p tag, as it really serves no obvious purpose.

If you choose to retain the p tag, you will need to suppress those margins yourself. You can do that manually by adding an inline style to the tag:

<p style="margin-top: 0; margin-bottom: 0;">...

Or you could add a CSS rule to do it globally. It's a little complicated by the fact that you have another tag (script tag) before the p tag in your table cell, so I'll refrain from posting a convoluted fix and recommend going with one of the two earlier suggestions.

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

所有回覆 (2)

more options

選擇的解決方法

Regarding the button positioning: you have a paragraph tag inside those four table cells:

<td>
 <script>... </script>
 <p>... </p>
</td>

Normally, a paragraph element has a top and bottom margin equal to the standard height of a line. Internet Explorer suppresses those margins when they are adjacent to the top and bottom boundaries of a table cell. Firefox does not.

In this case, it would be simplest to delete the p tag, as it really serves no obvious purpose.

If you choose to retain the p tag, you will need to suppress those margins yourself. You can do that manually by adding an inline style to the tag:

<p style="margin-top: 0; margin-bottom: 0;">...

Or you could add a CSS rule to do it globally. It's a little complicated by the fact that you have another tag (script tag) before the p tag in your table cell, so I'll refrain from posting a convoluted fix and recommend going with one of the two earlier suggestions.

more options

Just a Thank You note to jscher2000 for pointing out a error that was made long ago, but was copied over and over again.