|
Posted by Philip on 06/19/06 19:02
In article <lvSdne_8HoCscwvZ4p2dnA@telenor.com>,
"Jeff" <it_consultant1@hotmail.com.NOSPAM> wrote:
> "Philip" <NikitaTheSpider@gmail.com> wrote in message
> news:NikitaTheSpider-74A56A.11433819062006@news-rdr-01-ce0-1.southeast.rr.com.
> ..
> >> B) The code in menu css is taken from an example on the internet... In
> >> the
> >> example it uses these 2 css blocks to change the setting of the link the
> >> mouse is hovering over:
> >> #navigation a:hover
> >> #navigation a:hover
> >> But instead of a hovering effect I want to convert this css block to be
> >> show
> >> the current selected item in the ul block. I mean if u could show me how
> >> to
> >> embedd this css block in the html code, then I can do the rest... The
> >> actual
> >> page will be genereated using php, so in php I use a if-test... if
> >> selected
> >> then do this, if not selected to that....
> >
> > So let me get this straight: the UL is a navigation menu, and if the
> > user clicks on, say, item #6, she'll be directed to a page with this
> > same navigation menu on it but item #6 should look different from the
> > others. Is that correct? Why not have a style like so:
> > #CurrentlySelectedMenuItem { font-weight: bold; }
> >
> > Then use PHP to build your UL and give the 6th LI an
> > id="CurrentlySelectedMenuItem".
> Yes your suggestion with bold text works, it can show the selected item...
>
> However I also if possible would like to know how to set the backgrund color
> of the selected menu item...
#CurrentlySelectedMenuItem {
font-weight: bold;
background-color: red;
}
For more, see:
http://www.htmlhelp.com/reference/css/
--
Philip
http://NikitaTheSpider.com/
Bulk HTML validation, link checking and more
Navigation:
[Reply to this message]
|