New Landing How can we help? Cardinal Change hover and active state of nav-item

Viewing 11 posts - 1 through 11 (of 11 total)
  • Posted in: Cardinal
  • #136218
    Lars
    Member
    Post count: 91

    Hello,

    how I change the look of hover and active state of nav-items?

    I want that hover and active is only underlined.

    Best regards
    Lars

    #136227
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Add this to your custom css:

    nav .menu > li.menu-item:hover, nav .menu > li.menu-item.current-menu-item > a, nav.std-menu .menu > li:hover > a, nav.std-menu .menu > li.current-menu-item > a {
      text-decoration: underline;
    }

    – Kyle

    #136245
    Lars
    Member
    Post count: 91

    okay, this is great thanks for that.

    But the line is to close to the text. I tried to use border-buttom instead of underline:

    nav .menu > li.menu-item:hover, nav .menu > li.menu-item.current-menu-item > a, nav.std-menu .menu > li:hover > a, nav.std-menu .menu > li.current-menu-item > a {
      	color: #222222;
    	border-bottom: 1px solid #222222;
    }

    But the Problem is that the container becomes the border. Not the text.

    #136253
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Try this instead:

    nav .menu > li.menu-item:hover, nav .menu > li.menu-item.current-menu-item, nav.std-menu .menu > li:hover, nav.std-menu .menu > li.current-menu-item {
      	color: #222222;
        border-bottom: 1px solid #222222;
    }

    – Kyle

    #136257
    Lars
    Member
    Post count: 91

    no, it doesn’t work.

    #136258
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Can you please mockup a screenshot of what you’re trying to achieve?

    – Kyle

    #136261
    Lars
    Member
    Post count: 91

    Look in the attachment.

    Attachments:
    You must be logged in to view attached files.
    #136264
    Lars
    Member
    Post count: 91

    the line should be like the mockup. maybee the line goes 2 oder 4px down.

    #136272
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Try this:

    nav .menu > li.menu-item:hover .menu-item-text, nav .menu > li.menu-item.current-menu-item .menu-item-text, nav.std-menu .menu > li:hover .menu-item-text, nav.std-menu .menu > li.current-menu-item .menu-item-text {
      color: #222222;
      border-bottom: 2px solid;
    }
    

    – Kyle

    #136315
    Lars
    Member
    Post count: 91

    It works! Perfect! Magic-Kyle! Thank you!

    #136317
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register