You are here: Re: [CSS] background image disappears in Firefox when "float:" is used « HTML « IT news, forums, messages
Re: [CSS] background image disappears in Firefox when "float:" is used

Posted by Tomasz Chmielewski on 11/30/07 10:39

Ben C schrieb:

(...)

>> Expected result: "left column" and "right" column" written on respective
>> parts of the image. The image is available here: http://wpkg.org/sub2_bg.png
>>
>> Result: IE6, IE7 - OK
>> Firefox - image is not displayed
>>
>> When "float:left;" is commented out in #left_column, the image is
>> displayed in Firefox (but then, the text in the columns is messed).
>
> It's because your containing div has zero height, because it doesn't
> have any contents, except for floats, which don't count.
>
> IE is getting this wrong.
>
> Give #wrapper overflow: hidden and it will grow to the height of the
> floats and you will see your background images.
>
> And get rid of width:100% on #wrapper, it's pointless (unless it's for
> some weird IE bug I don't know about).

Indeed, I needed "overflow: hidden" - thanks a lot.



--
Tomasz Chmielewski
http://wpkg.org

 

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

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