Reply to Re: text foreground bacground colour

Your name:

Reply:


Posted by Ben C on 04/09/07 12:23

On 2007-04-09, Desmond <otuatail@aol.com> wrote:
> Is it possible to det the bacground colour of text without setting the
> entire background.
> I have menu items and the current item is set at #777777 but setting
> the background
> to background: #99E7E7; sets the whole of the menu not just the text.
> as in .....
>
> #tabnav li
> { margin: 0;
> padding: 0;
> display:list-item;
> list-style-type: none;
> /* background: #99E7E7; */
> color: #777777;
> }

That's because li is a block box (well display: list-item, but similar
to a block box). It sounds like you want an inline-box background.

Try putting the text you want the background colour behind in a <span>
element, and adding

#tabnav li span { background: #99E7E7; }

[Back to original 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

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