Log in

View Full Version : Resolved Active Color Gone from Menu



KennyP
03-27-2017, 03:23 PM
Hi:

Would you please help me sort out this problem with a menu?

It's basically a One Page Site. As you scroll down the page, menu items are supposed display in red when their section displays;

for example, when the About section is displaying on the screen, the corresponding About menu item should be red.

All of a sudden, without my changing any files whatsoever, menu items remain white -- their red color doesn't show at all unless they're hovered.

The hosting company said the script is not running correctly on the page, but I can't find any problem.

Would you please help me find it?

Kenny

EDIT: I RESOLVED IT

jundo12
03-31-2017, 12:08 AM
nevermind. wrong answer. read my next post

jundo12
03-31-2017, 12:39 AM
oh wait, i didn't read that thoroughly enough. it's not alink (unvisited link) you're interested in as once the viewer visits the page *since its all one page*, the links would all become whatever your visited link color is. it's active link you're interested in, which is another way of saying selected link

presumably the issue is you need to define the active link css

a:active {
color: red;
}

simply open the single page of your site in your html editing software (i use notepad++), and copy and paste this snippet

<style>
a:active {
color: red;
}
</style>

to the head of your html page. the head is anything between <head> and </head>, located near the top of your html document.

KennyP
04-02-2017, 05:42 PM
@Jundo12:

Thanks for your reply, but the solution is not as simple as that. The active color state is already declared; adding the above code makes no difference. I need to find out why it's not working and so far everyone has turned me down - including the wordpress forum. Even the developer of the theme wants me to reinstall the whole site - it seems no one knows why.

jundo12
04-05-2017, 12:56 AM
@Jundo12:

Thanks for your reply, but the solution is not as simple as that. The active color state is already declared; adding the above code makes no difference. I need to find out why it's not working and so far everyone has turned me down - including the wordpress forum. Even the developer of the theme wants me to reinstall the whole site - it seems no one knows why.

still not working? well when i saw the huge amount of files embedded in the header, my first thought was ----- sheesh, this is a maze of code. surely there's a way to achieve the same results without so many scripts and css files. my thought is that somewhere in that maze is an unclosed statement or too many close statements... . like no </div> after a <div> that isn't later, closed as it should be. sometimes there are divs inside divs and you don't close the first until you've finished with the divs inside and closed them correctly. depends on the layout, of course.

if copying that active link style script into the header isn't over-riding the problem, then clearly something is missing in the body of the document (like an unclosed div) or the css that directly controls the active link behavior. perhaps one css file is overwriting the other css file. like one css file defines active link to be red when active, and the other css file, undefines it. check how the css files are describing the active link style. i can't imagine why your javascripts would have any bearing on link color. that's usually the job of css.

styxlawyer
04-05-2017, 01:55 PM
.
.
.
EDIT: I RESOLVED IT

It might be helpful to other members if you tell us what you did to resolve the problem.