You are here: Re: 'clear' help needed « HTML « IT news, forums, messages
Re: 'clear' help needed

Posted by dorayme on 01/13/07 21:17

In article <slrneqhahc.a9t.spamspam@bowser.marioworld>,
Ben C <spamspam@spam.eggs> wrote:


> > This has not resulted in any clearing of _all_ the floats, just
> > the one I wanted cleared...
>
> There's no "clear" set on it at all, just a top margin. So it starts
> below the preceding block box (p id="welcome") in the normal way.
>
.....

> I think you must have deleted "clear: left" from .clear and forgot you'd
> done it.
>

This is exactly what happened! Well spotted. In fact I did first
apply the top-margin to the heading that was dropping unwanted,
got a result that was ok but then had a play and tried the empty
div clear: but, after its failure, just stuck the margin on it
instead and left it! Of course, I should have gone on to chuck it
and apply the margin back to the heading below. Sorry. Your
remarks made everything come back to me.


> There is a way to get clear to restrict itself only to the white box,
> which is to make the white box itself a float.
>

That's an idea. I just tried this quickly by floating the
"content" id ... but all sorts of things went wrong... I will
consider it when I have more time. Better not spend too much for
the sake of a drop cap. (It is all Farmer Joe's fault, he was the
one that gave me the idea of a drop cap)


> The clear and float properties only take into account floats in the same
> "block formatting context", but note that a "block formatting context"
> is not just any block box.
>
> Block formatting contexts are rather obscure, but as far as I can see,
> the basic purpose of them is restrict the effect of floats. Floats mess
> up things in their own BFC but not outside.

--
dorayme

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация