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

Posted by rf on 01/31/08 01:13

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

What you see is the *contents* of the second div appearing to the right of
the *contents* of the first div. These two lots of *contents* have been
removed from the normal flow, because they are floated, and will naturally
stack up next to each other. Turn borders on (in different colours) for the
various divs and you will see what is hapenning.

> My intention is to have the 2nd outer DIV
> appear below the first.

Give the second div style="clear: both:"

--
Richard.

 

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

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