Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

Learn More

Firefox 4 element seems to gain top margin when only bottom margin is set.

  • 1 réponse
  • 14 ont ce problème
  • 6 vues
  • Dernière réponse par dponinski

more options

I've been working on blocking out a page layout, and after I upgraded to Firefox 4 I noticed that a central element containing 3 floating elements and a clearing div suddenly started gaining spacing where the top margin would be whenever the bottom margin was set. One can bypass the problem by either giving the clearing div a height somehow or by using padding instead, but I want to know if this is a bug or that I'm just missing something. This behavior is not duplicated in any other browser I've tried including IE6.

I have set up a demo at http://jacobanderson.us/projects/bugs/firefox4margintest.html - if you edit the bottom margin of the "body .page .content .keynote" element in Firefox 4 you'll see that the entire element gains spacing on both the bottom and top equally. The same effect can be triggered by adding a top margin to the "body .page .content .columns" element.

I've been working on blocking out a page layout, and after I upgraded to Firefox 4 I noticed that a central element containing 3 floating elements and a clearing div suddenly started gaining spacing where the top margin would be whenever the bottom margin was set. One can bypass the problem by either giving the clearing div a height somehow or by using padding instead, but I want to know if this is a bug or that I'm just missing something. This behavior is not duplicated in any other browser I've tried including IE6. I have set up a demo at http://jacobanderson.us/projects/bugs/firefox4margintest.html - if you edit the bottom margin of the "body .page .content .keynote" element in Firefox 4 you'll see that the entire element gains spacing on both the bottom and top equally. The same effect can be triggered by adding a top margin to the "body .page .content .columns" element.

Toutes les réponses (1)

more options

I seemed to have solved the issue with the margin on the top and bottom. Just float the header and footer left. You might need to clear left or right depending on your layout but that did the trick for me. Hope this helps.