You are here: Re: floating div « HTML « IT news, forums, messages
Re: floating div

Posted by Martin Jay on 06/22/06 12:04

In message <e7dhun$12uu$1@justice.itsc.cuhk.edu.hk>, vito
<vitogen2003@yahoo.com.tw> writes
>i use div to make a layout like this:
>
>
>1 2
>3 3
>
>
>the 1, is float:left
>the 2, is float:left
>the 3, is float:bottom

There's no 'float: bottom.' Presumably this is ignored by browsers.

How about something like this:

<div style="float: left;
width: 200px; height: 200px; border: 1px solid red;">1</div>

<div style="float: left;
width: 200px; height: 200px; border: 1px solid red;">2</div>

<div style="float: left; clear: both;
width: 200px; height: 200px; border: 1px solid red;">3</div>

Width, height, and border added to make it clear what's happening.
'clear: both;' or 'clear: left;' will bring the third floated DIV below
the two above.
--
Martin Jay
Phone/SMS: +44 7740 191877
Fax: +44 870 915 2124

 

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

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