![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have managed to isolate the problem in some static html, but I don't understand why it occurs. The "clearfix" class did not really address the problem. Remove all of |
#3
| |||
| |||
|
|
Alan Chandler wrote: I have managed to isolate the problem in some static html, but I don't understand why it occurs. The "clearfix" class did not really address the problem. Remove all of the "clearfix" classes. They are useless for your example. The difficulty you are having is that you float:left nearly everything in a "family" div, leaving the div with essentially no content. Thus the div height collapses to a minimum value determined by padding and margin. The same thing occurs for non-floated divs that do not have any content. Add to each div that does not have any content besides other floated divs, or non-floated divs (e.g., "children") with no content. |
#4
| |||
| |||
|
|
Jim Moe wrote: Add to each div that does not have any content besides other floated divs, or non-floated divs (e.g., "children") with no content. I actually managed to get a css solution from another mailing list. The issue is the .clearfix:after selectors clear:both property. Apparently (I don't understand why - but it works) adding an overflow: property solves it. I am trying to get a fuller explanation from that list. But I take your point. I originally put the clearfix solution in as a matter of principal - but its proving more trouble that its worth, and essentially making my css extremely difficult to understand. I think I will try and add the padding in via   in the code as you suggest. |
#5
| |||
| |||
|
|
Unfortunately it doesn't work. The embedded floating divs sometimes wordwrap (depends on browser window width) and get a height that is greater than one line. The only makes the surrounding div one line high, which in these cases is not enough. Because many, but not all, of the divs are floated, you are going to |
![]() |
| Thread Tools | |
| Display Modes | |
| |