CSS Discoveries [en]

I don’t know if everybody is aware of this (maybe it’s normal behaviour), but I thought I’d share my recent discoveries (as they caused me to bang my head against the wall and tear a few handfulls of hair out until I understood).

  1. clear: both – seems to ignore absolutely positioned divs, which means that if you are using {clear: both} to push your div to the bottom of the page, and that the “longest” div on your page is absolutely placed, you might not get the desired result.
  2. margin-top – seems to be ignored by ie5mac when applied to a floating div. Depending on the situation, you can try replacing margin-top by padding-top (if the div has no background or border, and all you really want to do is shift the contents downwards).

Leave a Reply

Your email address will not be published. Required fields are marked *