
Why are table buttons in wrong position only on Firefox?
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)
選擇的解決方法
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.
Just a Thank You note to jscher2000 for pointing out a error that was made long ago, but was copied over and over again.