By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,245 Members | 884 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,245 IT Pros & Developers. It's quick & easy.

Different style applied when each page in a menu is open

P: n/a
Hi,
Could somebody explain if I can use CSS to have a menu item look
different when I'm on the URL that matches the href of the link

i.e. I have a menu: home - about - links
A stylesheet is in place that changes the background of the menu item
on mouseover. When someone clicks on a link I want that menu item
background to stay highlighted while that page is being viewed.
Is this possible without having to change every single page?

Thanks, great group! John
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <b5**************************@posting.google.com >,
re******@hotmail.com says...
Hi,
Could somebody explain if I can use CSS to have a menu item look
different when I'm on the URL that matches the href of the link

i.e. I have a menu: home - about - links
A stylesheet is in place that changes the background of the menu item
on mouseover. When someone clicks on a link I want that menu item
background to stay highlighted while that page is being viewed.
Is this possible without having to change every single page?

Thanks, great group! John

Take a quick look at http://www.animals-in-distress.net/home2.htm (in IE
only at the moment) it might give you an idea

Gerald
Jul 20 '05 #2

P: n/a
In article <b5**************************@posting.google.com >,
re******@hotmail.com says...
Take a quick look at http://www.animals-in-distress.net/home2.htm (in IE
only at the moment) it might give you an idea

Gerald


Thanks Gerard, I had a look at that and it is what I am looking for
(the effect in the table at the top of every page after the homepage).
I had a look at the source and the style sheet but wasn't able to
figure out how it is done. Did you have to change the background of
the relevant table cell in every page or can I do it in a template
with CSS or otherwise and get it to change all pages? Any assistance
would be appreciated. John

Hi,

The menu is an unordered list and is done in CSS but take a look at
http://www.animals-in-distress.net/home.htm for the version in a table in
which you have to change the cell background for each page.

if you want to send me your email address to the webmaster address on the
website I'll send you the CSS for the menu on the CSS page.

Gerald
Jul 20 '05 #3

P: n/a
Thanks Gerard, I have emailed the webmaster address. I am pretty new
to CSS. Can you tell me, do I just add the elements that you send me
to my existing CSS file?. Step by Step instructions would help greatly
but maybe thats pushing it...Cheers

John


Hi,

The menu is an unordered list and is done in CSS but take a look at
http://www.animals-in-distress.net/home.htm for the version in a table in
which you have to change the cell background for each page.

if you want to send me your email address to the webmaster address on the
website I'll send you the CSS for the menu on the CSS page.

Gerald

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.