You are here: Re: Background transparent when 'background' is used « HTML « IT news, forums, messages
Re: Background transparent when 'background' is used

Posted by Michael Winter on 09/26/06 11:53

JWL wrote:

[snip]

> #wrap2 {
> width: 800px;
> background-color: #FFF;
> background: url(images/line.gif) repeat-y;
> }
>
> Suddenly, wrap2 becomes transparent ...

The shorthand property can also be used to specify the colour, but as
you haven't included it, the initial value of transparent is used
instead. That is:

background: url(images/line.gif) repeat-y;

is equivalent to:

background: transparent url(images/line.gif) repeat-y scroll 0% 0%;

As this declaration follows the explicit background-color property
declaration, it overrides the value set there.

This sort of thing applies to all shorthand properties. Either swap the
declaration order, or include the colour in the shorthand declaration.

[snip]

Mike

 

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

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