OK, I tried everything and still can't get rid of extra height from the
clearer div.
URL:
http://www.kpuc.org/ (See "Next event" div in right column)
- Floated (calendar-style) div and clearer div have been given a dashed
border for easier debugging.
- HTML, slightly simplified (removed details from floated div, which is not
the problem here; View Source if you do want to see all the details):
<div class="Sidebar">
<h1>Next event</h1>
<!-- Calendar-style date --><div class="FloatLeft AccentBackground"
[...]> [...] </div>
<p><a href="/events/upcoming.html">Blessing of the animals</a></p>
<div class="FlowFloat" style="border: 1px dashed #ddd; margin: 0;
padding: 0; visibility: visible;"></div>
</div>
(I tried adding inline margin & padding=0 in case they somehow weren't
inherited properly -- my style sheet includes global properties for all divs
in a sidebar, which include *some* padding and/or margin. Also, visibility:
visible is for debugging -- invisible doesn't remove the ~dozen pixel in
height inside the div.)
- CSS for clearer div:
FlowFloat {
/* Used at the bottom of any block-level element containing a float,to
ensure the element's height takes the float into account (remember:
floats are not part of the normal flow) */
clear: both;
height: 0;
margin: 0;
padding: 0;
line-height: 0;
font-size: 0;
visibility: hidden;
}
So, I don't know what to do to get rid of the clearer div's content height.
Any advice? Thanks!