You are here: Re: text foreground bacground colour « HTML « IT news, forums, messages
Re: text foreground bacground colour

Posted by Desmond on 04/09/07 11:59

On 9 Apr, 12:38, "Jukka K. Korpela" <jkorp...@cs.tut.fi> wrote:
> Scripsit Desmond:
>
> > Is it possible to [s]et the bac[k]ground colour of text without setting
> > the
> > entire background.
>
> It depends on what you mean by background of text. You can set the
> background for an _element_, including pseudo-elements, not for text as
> such.
>
> > 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;
> > }
>
> Why have you put the most important declaration in a comment?
>
> Anyway, <li> elements occupy the available width by default, and setting the
> background sets it for the element, not just for the text in it. So
> apparently you would like to make element's width smaller or to set
> background for an inner element that has a smaller width.
>
> What are you really trying to accomplish? This sounds like a navigational
> menu. Perhaps you should set some suitable width (say width: 5em) for all
> items in the menu. Or perhaps you should post the URL.
>
> --
> Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/

Ok this is going to get messy. The original site had the menu on every
page, making changes difficult. but at least it kept the active menu
hi-lighted. I have taken out the menus on a test site and placed the
menu in a seperate file for inclusion. I can't get the site to
remember which menu item is the current one.

The original site is
http://www.yorkbaptist.org.uk/activities.html

the test site is
http://www.des-otoole.co.uk/YBC2/

menu is controled by a style sheet using #tabnav a:link.active,
#tabnav a:visited.active

Desmond.

 

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

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