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

Posted by Tomasz Chmielewski on 12/03/07 11:02

GTalbot schrieb:
> On 29 nov, 12:44, Tomasz Chmielewski <t...@nospam.syneticon.net>
> wrote:
>> I have a problem with CSS. Generally, my site looked good in Firefox and
>> IE7, but then, I wanted to see how it looks in IE6 (which still has over
>> 30% of the market) - the result wasn't that great, the page looked ugly.
>>
>> So I made various changes, and now the page looks good in IE6 and IE7.
>> In Firefox however, a background image is not displayed when I add a
>> "float" element to CSS. Where is the problem?
>>
>> An example code is here:
>>
>> http://wpkg.org/cssproblem.html
>>
>> 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
>
>
> [snipped]
>
>> <style type="text/css">
>> #wrapper {
>> clear: both;
>> width:100%;
>> background-image: url(sub2_bg.png);
>> background-repeat: repeat-y;
>>
>> }
>
> [snipped]
>
>> --
>> Tomasz Chmielewski http://wpkg.org
>
>
> Tomasz,
>
> Ben C is right: just get rid of the width: 100% on the div#wrapper:
> width: 100% is an useless and pointless declaration in your
> stylesheet.

It's not useless - it is a workaround for a IE6 bug - without it, IE6
won't show the background image.



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

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