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. change font size for two menu points in mobile-menu

change font size for two menu points in mobile-menu

Scheduled Pinned Locked Moved General Discussion
6 Posts 2 Posters 611 Views 1 Watching
  • 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.
  • F
    F
    florine
    wrote on last edited by
    #1

    Hi!

    I would like to appear 2 menupoints smaller in the mobile menu than the rest and change their color and font style.
    I tried to do this in the 'css for Mobile Version' section of lay theme-options with the following code:

    nav.laynav {
    font-family: "ABCDiatype-Regular";
    font-size: 17px; !important;
    }
    
    .menu-item-6969 {
        font-family: "ABCDiatype-RegularItalic";
    font-size: 12px; !important;
    color: white;
    }
    
    .menu-item-6968 {
        font-family: "ABCDiatype-RegularItalic";
    font-size: 12px; !important;
    color: white;
    }
    

    This did work out for the font style, but not for the size and the color.
    Can you tell me why / what I have to do?

    I also did put up settings in 'Costumize' > 'Mobile Menu', where I defined the font size for the menupoints on 17px. Maybe this is where the problem parts from?

    this is the website I am working on:
    https://tanzhausbern.ch/on-stage/

    Thanks for your help
    Florine

    1 Reply Last reply
    0
    • arminunruhA
      arminunruhA
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      there is an error in your css:

      Screenshot 2022-07-29 at 16.19.12.png

      it needs to be:
      font-size: 12px!important;

      1 Reply Last reply
      0
      • F
        F
        florine
        wrote on last edited by
        #3

        Dear Armin
        Oh, sorry!

        I changed that and it still doesn't work for the font size though
        my css now is:

        nav.laynav {
        font-family: "ABCDiatype-Regular";
        font-size: 17px;
        }
        
        .menu-item-6969 {
            font-family: "ABCDiatype-RegularItalic";
        font-size: 12px!important;
        }
        
        .menu-item-6968 {
            font-family: "ABCDiatype-RegularItalic";
            font-size: 12px!important;
        }
        

        it's really strange that it accepts the font-family but not the size.
        Hope there is not another error in the code...
        Thanks for helping!

        1 Reply Last reply
        0
        • arminunruhA
          arminunruhA
          arminunruh
          Global Moderator
          wrote on last edited by arminunruh
          #4

          Screenshot 2022-07-30 at 11.09.55.png

          your css targets:
          .menu-item-6969 {}

          but my css as you can see in the screenshot above targets:
          nav.mobile-nav li a

          my css has precedence because the selector is more specific.
          read about it here:
          https://jenkov.com/tutorials/css/precedence.html

          this should work:

          nav.mobile-nav li.menu-item-6969 a {
              font-family: "ABCDiatype-RegularItalic";
              font-size: 12px!important;
          }
          
          nav.mobile-nav li.menu-item-6968 a {
              font-family: "ABCDiatype-RegularItalic";
              font-size: 12px!important;
          }
          
          1 Reply Last reply
          0
          • arminunruhA
            arminunruhA
            arminunruh
            Global Moderator
            wrote on last edited by
            #5

            also, you can add css classes to menu points and use them instead of targeting the menu points individually in appearance -> menus:
            Screenshot 2022-07-30 at 11.14.17.png

            1 Reply Last reply
            0
            • F
              F
              florine
              wrote on last edited by
              #6

              Dear Armin

              Great, now it works! Thank you so much!

              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
              kinkarobotinaK
              kinkarobotina
              L
              Liefko
              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