You are here: Re: CSS: no parent background on float=left child « HTML « IT news, forums, messages
Re: CSS: no parent background on float=left child

Posted by Jonathan N. Little on 05/17/06 20:59

Vadim wrote:
> Hi!
> Why I can't see the parent background on child divs?
> Thanks
>
> <div id="Chrono_Actions">
> <div class="Last_Transaction">aaa</div>
> <div class="Last_Comments">bbb</div>
> </div>
>
> <style>
> #Chrono_Actions
> {
> background-color: #ecf6d9;
> }
>
> #Chrono_Actions .Last_Transaction
> {
> float: left;
> }
>
> #Chrono_Actions .Last_Comments
> {
> float: right;
> }
> </style>
>

Because div "Chrono_Actions" has no content. Once you make the child
div's float they are no longer part of rendering flow of the container.
Prove it by adding some content....

div id="Chrono_Actions">
<div class="Last_Transaction">aaa</div>
<div class="Last_Comments">bbb</div>
Now you will see the background...
</div>
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

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

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