Pesquisar no site de suporte

Evite golpes de suporte. Nunca pedimos que você ligue ou envie uma mensagem de texto para um número de telefone, ou compartilhe informações pessoais. Denuncie atividades suspeitas usando a opção “Denunciar abuso”.

Saiba mais

Esta discussão foi arquivada. Faça uma nova pergunta se precisa de ajuda.

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

  • 1 resposta
  • 14 têm este problema
  • 6 visualizações
  • Última resposta de 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.

Todas as respostas (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.