It is doing the block level elements the way you expect. None of the block-level elements are overlapping.
But the bordered text is not a block level element because you made it an inline box. If you put the bordered text inside the <p>
, or inside it's own <p>
, or get rid of the display: inline
, then you will get a box-level layout as you expected.
Update: yet another way to fix this would be to put the stuff above the table inside a div (that isn't inline) and then style that div with identical but transparent margins and padding.
.blockMargin {
padding-bottom: 0.6em;
border-width: 2px;
border-color: transparent;
}
DigitalRoss
2009-09-03 02:37:26