You are here: Re: DIV question « HTML « IT news, forums, messages
Re: DIV question

Posted by dorayme on 01/31/08 20:03

In article <wFgoj.9376$421.6232@news-server.bigpond.net.au>,
"rf" <rf@invalid.com> wrote:

>
> "Ben C" <spamspam@spam.eggs> wrote in message
> news:slrnfq3261.fqh.spamspam@bowser.marioworld...
> > On 2008-01-31, rf <rf@invalid.com> wrote:
> >>
> >><plenty900@yahoo.com> wrote in message
> >> news:6b139bab-cd18-413e-b117-12c6cba33b15@s13g2000prd.googlegroups.com...
> >>> Hi folks,
> >>>
> >>> I've got some HTML like this:
> >>>
> >>> <DIV>
> >>> <DIV style="float: left; width: 40"> text </DIV>
> >>> <DIV style="float: left; width: 40"> text </DIV>
> >>> <DIV style="float: left; width: 40"> text </DIV>
> >>> </DIV>
> >>> <DIV>
> >>> <DIV style="float: left; width: 40"> text </DIV>
> >>> <DIV style="float: left; width: 40"> text </DIV>
> >>> <DIV style="float: left; width: 40"> text </DIV>
> >>> </DIV>
> >>>
> >>> I'm finding that the second outer DIV is appearing
> >>> to the right of the first outer DIV.
> >>
> >> No it isn't. It is below the first div.
> >
> > In a sense, although both divs have zero height, so they are in this
> > case also on top of each other, which is a special case of below.
> >
> > As dorayme points out, the floats in each div do always go at least
> > below the the top inside padding edge of the block they're in.
> >
> > It's only because, with no borders or padding on the blocks, the top
> > inside padding edges of the two divs are in exactly the same position
> > that the floats are all aligned vertically with each other.
>
> Which is why switching on some borders makes everything self evident.

Switching on some borders can also puzzle and confuse OP without
an understanding of a few issues that surround this matter.

<http://netweaver.com.au/alt/contentlessDivs.html>

would be sure to confuse (alter browser text size up and down).

And while:

<http://netweaver.com.au/alt/contentlessDivs.html2> brings out
some things more clearly, it would not be obvious to many people
what exactly these things are.

--
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

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