![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
"Stan Brown" <the_stan_brown (AT) fastmail (DOT) fm> wrote in message news:MPG.1a454d13fa958fd098b956 (AT) news (DOT) odyssey.net... Could you please enlighten me by citing the section of the CSS spec from which you conclude that No, but I gladly enlighten you to a recent post where I admit I was in error. |
#22
| |||
| |||
|
|
I do agree that <p> </p> is silly. That should be a div. Equally silly, use margins. I'll confess to using it to ensure that a block level element whose contents are floated is given vertical space in the rendering. Margins do not always work, since the floated element is taken out of the normal document flow. |
|
Moreover, without a cleared element, borders (taking just one example) are not rendered around the block in certain browsers. |
#23
| |||
| |||
|
|
I do agree that <p> </p> is silly. That should be a div. Equally silly, use margins. I'll confess to using it to ensure that a block level element whose contents are floated is given vertical space in the rendering. Margins do not always work, since the floated element is taken out of the normal document flow. You want to float an element and ensure that the content that follows next is positioned beneath the float? (then why float?) No. (Where did you get that idea?) I want to float an element, and set a margin between it and whatever element comes below it. |
|
Moreover, without a cleared element, borders (taking just one example) are not rendered around the block in certain browsers. Huh? Example please. http://www.tsmchughs.com/menus/dinner-float-test View it in MSIE 5.0/Win2k. Compare with http://www.tsmchughs.com/menus/dinner |
#24
| |||
| |||
|
|
What's with the chip on your shoulder? Adding <div> </div> and clearing that div will change the borders. |
#25
| |||
| |||
|
|
What's with the chip on your shoulder? Adding <div> </div> and clearing that div will change the borders. |
|
Possibly, and <br><br><br><br><br> will create vertical space, both are bad coding practices, and that is what is being pointed out here. |
#26
| |||
| |||
|
|
Possibly, and <br><br><br><br><br> will create vertical space, both are bad coding practices, and that is what is being pointed out here. |
#27
| |||
| |||
|
|
Possibly, and <br><br><br><br><br> will create vertical space, both are bad coding practices, and that is what is being pointed out here. Then what do you recommend an author do when he's floating something and wants more space under the float before the other element begins to wrap under it? |
#28
| |||
| |||
|
|
Specify a margin. |
|
Btw, elements don't wrap. |
#29
| |||
| |||
|
|
Specify a margin. Prev poster says sometimes that is not to be relied on. |
|
Btw, elements don't wrap. My error is likely one of terminology. One good reason to float is so that content can eventually flow under the floated element, as in a photo inset into a column of text. But I'm sure you know that. That's the phenomenon I was referring to. |
#30
| |||
| |||
|
|
Back up in the thread a bit and you'll notice that he did not back up that claim when asked. Here you go, Spartanicus: http://www.tsmchughs.com/test/float-margin http://www.tsmchughs.com/test/float-margin-with-div |
|
The margins of floating boxes never collapse with margins of adjacent boxes. |
![]() |
| Thread Tools | |
| Display Modes | |
| |