Results 1 to 6 of 6

Thread: Active Color Gone from Menu

  1. #1
    Join Date
    Dec 2009
    Location
    NY NY USA
    Posts
    228
    Thanks
    158
    Thanked 1 Time in 1 Post

    Default Active Color Gone from Menu

    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
    Last edited by KennyP; 04-03-2017 at 06:57 AM.

  2. #2
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    nevermind. wrong answer. read my next post
    Last edited by jundo12; 03-31-2017 at 12:40 AM.

  3. #3
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    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.
    Last edited by jundo12; 03-31-2017 at 01:31 AM.

  4. The Following User Says Thank You to jundo12 For This Useful Post:

    KennyP (04-02-2017)

  5. #4
    Join Date
    Dec 2009
    Location
    NY NY USA
    Posts
    228
    Thanks
    158
    Thanked 1 Time in 1 Post

    Default

    @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.

  6. #5
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    Quote Originally Posted by KennyP View Post
    @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.
    Last edited by jundo12; 04-05-2017 at 01:14 AM.

  7. #6
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    Quote Originally Posted by KennyP View Post
    .
    .
    .
    EDIT: I RESOLVED IT
    It might be helpful to other members if you tell us what you did to resolve the problem.

Similar Threads

  1. Switch Menu: can I alter style of active menu item?
    By dmshep99 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-23-2010, 07:25 PM
  2. active header links color
    By racerxfactor in forum Dynamic Drive scripts help
    Replies: 10
    Last Post: 05-22-2009, 04:29 PM
  3. Glossy Menu - Active menulink not coloured when active
    By Trial and Error in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 04-02-2009, 10:54 PM
  4. Switch Menu II sub-menu active background colour
    By QuickDraw in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 11-05-2008, 12:27 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •