Forums

[resolved] custom nav highlight. (2 posts)

  1. e.novak.paul@gmail.com
    Member
    Posted 5 months ago #

    Hi, have created my own custom nav which stays highlighted different colors dependent on which page your on. This was all working fine with the following css for each page:

    .page-item-5 a { color:#A87C4F; }
    .page-item-7 a { color:#4D4D4D; }
    .page-item-9 a { color:#57B6DD; }
    .page-item-11 a { color:#EDDB00; }
    .page-item-13 a { color:#009345; }

    Now I have created a category to replace a page and have lost the highlight for that category page. Does anyone know what i should be replacing .page-item-# with??

    Thanks in advance.

  2. e.novak.paul@gmail.com
    Member
    Posted 5 months ago #

    Fixed it anyway,

    in-case anyone else is curious the code i needed for category pages were:

    .category-1 ul li:nth-child(1) a { color:#F6921E; }
    .category-6 ul li:nth-child(2) a { color:#A87C4F; }
    .page-item-7 a { color:#4D4D4D; }
    .category-7 ul li:nth-child(4) a { color:#57B6DD; }
    .page-item-11 a { color:#EDDB00; }
    .page-item-13 a { color:#009345; }

Reply

You must log in to post.

About this Topic

Tags