I am trying to use CSS to change the appearance of the link for the current page in the menu bar.
The concept is to provide an ID for the body tag and an ID for the href and then reference the href ID as a descendant of the body id in the CSS file. So the change only takes place for the page that is current, and only that link gets changed.
[ comment added ] Strangely enough I found that the post shortly before this addresses this same issue - see post “How to load a new menu bar content from horizontal menu bar to the left side menu bar? ” I did not recognize that it covered the same issues from the title.
So I have the following code for the body tag:
<body id="home">
And for the hrefs I have the following:
<a href="home.html" id="home1"> Home </a>
<a href="about.html" id="about1"> About </a>
<a href="updates.html" id="updates1"> Updates </a>
<a href="join1.html"id="join1"> Join/Contact </a>
And in the CSS I have tried all kinds of things, but nothing I have tried works. I think I need an ‘a’ marker in their somewhere. I have looked on line for documentation on using descendants with IDs, but I keep getting stuff about descendants using classes.
So how do I reference the href with ID ‘home1’ within the body with id ‘home’ to change attributes on the href (text or background color for instance)?
thanks
GALJohnson