Search code examples
google-chromemargin

Chrome bug: margin-bottom to the browser edge?


I'm not sure if this is a bug in Google Chrome or if this is wanted, but it really annoys me: If I got something like

<body><div style="margin-bottom: 50px;">much content</div></body>

there is no margin shown by Chrome. The div just ends at the bottom browser edge. Literally, any other browser renders this correctly.


Solution

  • add a padding-bottom to the element containing your div, even if it's the body element. This works in all browsers, so you will have to remove the bottom margin from the div.