Skip to main content
LIZZIE
Inspiring
April 24, 2019
Answered

find the correct line of code to add a fixed highlighting on the menu item that you're currently on

  • April 24, 2019
  • 1 reply
  • 1576 views

2.

I was also trying to find the correct line of code to add a fixed highlighting on the menu item that you're currently on. As a quick example...

If you're on the home page, I would like the menu item in the overlay to look like this.

Home Page

About

Contact

Information

...and then when you switch to another page, like the "information page," it should look like this...

Home Page

About

Contact

Information

Pokémon - English dubbed episode 0001

I'm for some reason stuck on these two problems now. I was able to find everything else and style it accordingly, and I even added code of my own to gain additional properties that I preferred, but I'm clearly missing something here.

Thank you for any help that you could give to me.

This topic has been closed for replies.
Correct answer LIZZIE

If your server-side include file contains anything more than just the relevant menu code, you're breaking your site from within.  Are you using a local testing server to parse your includes?   If yes, switch to Live Code and validate the Live Document from DW CC.


I finally fixed it. It actually had nothing to do with any of the problems that you or myself had pointed out. There was a comma in my css before the beginning of the brackets.

The css was like this...

body.homepage a.homepage, body.news a.news, body.videogames a.videogames, body.leeightonsanimewalkthrough a.leeightonsanimewalkthrough, body.pokedex a.pokedex, body.forums a.forums, {
        
color: #FC3131;
        
}

when it should have been like this...

body.homepage a.homepage, body.news a.news, body.videogames a.videogames, body.leeightonsanimewalkthrough a.leeightonsanimewalkthrough, body.pokedex a.pokedex, body.forums a.forums {
        
color: #FC3131;
        
}

It had been working, but the style was not, apparently. Go figure...

1 reply

Nancy OShea
Community Expert
Community Expert
April 25, 2019
Nancy O'Shea— Product User & Community Expert
LIZZIE
LIZZIEAuthor
Inspiring
April 25, 2019

hmmm, I tried following your tutorial, but it doesn't seem to be working for some reason...? Do you see anything that I messed up?

Nancy OShea
Community Expert
Community Expert
April 25, 2019

You forgot to give a class name to  your <body> tag.  When the <body class matches an anchor class,  automatic highlighting (or whatever style you gave it) occurs..

Nancy O'Shea— Product User & Community Expert