Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. :active / :visited styles for project menu items

:active / :visited styles for project menu items

Scheduled Pinned Locked Moved General Discussion
4 Posts 2 Posters 452 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L
    L
    Leonie
    wrote on last edited by Leonie
    #1

    Hi,
    sorry in advance if this is an annoying CSS question, but I just can't wrap my head around it.
    I am trying to define individual styles for each menu item in the project sub-menu in one category. So I want Project A to be red when hovered, active and visited, Project B to be blue when hovered, active and visited, etc...

    I have incorporated this in the custom CSS so far:

    .menu-item-138 a:hover{
    		color: red !important;
    }
    
    .menu-item-138 a:hover::after {
    		content: 'xxx';	
    		font-family: Arial;
    		font-size: 15px;
    		margin-left: 30px;
    }
    

    and it works perfectly fine, but I can't find a way to specify the same for the active and visited state of the menu-items. Is this even possible? It tried some things with current-menu-item, but couldn't customize it to only one menu-item at a time.
    Would be very happy about some help, thanks a lot!

    1 Reply Last reply
    0
    • mariusjopenM
      mariusjopenM
      mariusjopen
      Global Moderator
      wrote on last edited by
      #2

      Dear @Leonie
      sure! The keyword is current-menu-item.

      Hope that helps!

      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • L
        L
        Leonie
        wrote on last edited by
        #3

        Hi Marius,

        thanks for your reply! I tried current-menu-item but could only make it work with one style for all current menu items. But I want menu-item A to look different when active and after it was visited to menu-item B when that one is active or was visited. Here's a sketch of what I mean:

        State 1: no menu item has yet been visited
        A.png

        State 2: menu item A and B have been visited, menu item C is active
        B.png

        Hope that makes sense?

        1 Reply Last reply
        0
        • mariusjopenM
          mariusjopenM
          mariusjopen
          Global Moderator
          wrote on last edited by
          #4

          Dear @Leonie
          looks like a lot of repeating code :-D

          #menu-item-236.current-menu-item {
                          content: 'xxx';	
          		font-family: Arial;
          		font-size: 15px;
          		margin-left: 30px;
          }
          

          Hope that helps!

          Best!

          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          Online Users
          I
          itsbadjujuju
          Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
          laytheme.com
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Search