You are here: Re: Float wrap blindspot « HTML « IT news, forums, messages
Re: Float wrap blindspot

Posted by Ben C on 10/22/06 10:49

On 2006-10-22, dorayme <doraymeRidThis@optusnet.com.au> wrote:
> Can't quite see the analysis of why the last floated div at
>
><http://members.optushome.com.au/droovies/galleryTemplate/galleryF
> loatOddity.html>
>
> is not wrapping to the far left under some not unreasonable
> browser widths on a big monitor. If you cannot see what I might
> be puzzled by, there is a screenshot (gif'd down to show the wrap
> I am finding odd, not for the arty effect!) at
>
><http://members.optushome.com.au/droovies/galleryTemplate/floatWra
> pPuzzle.gif>

> I am pretty sure this is "correct behaviour" but am a bit miffed
> as to why there is room for it there rather than naturally on the
> next line?

The relevant part of the CSS2.1 spec is the rather mealy-mouthed 9.5.1
paragraph 2:

"If the current box is left-floating, and there are any left-floating
boxes generated by elements earlier in the source document, then for
each such earlier box, either the left outer edge [p. 100] of the
current box must be to the right of the right outer edge [p. 100] of the
earlier box, or its top must be lower than the bottom of the earlier
box. Analogous rules hold for right-floating boxes."

And paragraph 9:

"A left-floating box must be put as far to the left as possible, a
right-floating box as far to the right as possible. A higher position is
preferred over one that is further to the left/right."

So the situation is, you (or rather the UA) put the left float to the
right of any other left floats, unless there isn't room for it, in which
case you move it down by the smallest amount you can get away with until
there is room for it. You don't worry particularly about getting it all
the way to the left.

 

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

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