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. use different fonts in one menu item ?

use different fonts in one menu item ?

Scheduled Pinned Locked Moved General Discussion
9 Posts 3 Posters 884 Views 2 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.
  • D
    D
    danny
    wrote on last edited by
    #1

    Dear @arminunruh,

    is it possible to use different fonts in one menu item? I would like to use three different fonts for menu-item-92 (tiran willemse in the left lower corner). Meaning the T would be another font the I, then R and so on. So it would look like this (see image). Note: these are not different cuts, but different fonts.

    I would like to do the same for menu-item 97 (contact @).

    Bildschirmfoto 2024-07-25 um 14.16.24.png

    https://tiranwillemse.com/fullscreen2/

    Thanks a lot. best wishes
    Daniel

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

      hm you'd need to have each letter wrapped in an html element to be able to style the letters separately!
      put this in lay options → html at bottom:

      
      <script>
          var text = document.querySelector('.menu-item-97 span').textContent;
          var text_wrapped = text.replace(/\w/g, '<span>$&</span>');
      
          document.querySelector('.menu-item-97 span').innerHTML = text_wrapped;
      </script>
      

      this will lead to markup like this:

      Screenshot 2024-07-29 at 19.21.32.png

      now use css

      .menu-item-97 a>span span:nth-child(1){
          font-weight: 800!important;
      /*instead of font-weight, use font-family: …; CSS*/
      }
      .menu-item-97 a>span span:nth-child(2){
      
      }
      .menu-item-97 a>span span:nth-child(3){
      
      }
      .menu-item-97 a>span span:nth-child(4){
      
      }
      .menu-item-97 a>span span:nth-child(5){
      
      }
      .menu-item-97 a>span span:nth-child(6){
      
      }
      .menu-item-97 a>span span:nth-child(7){
      
      }
      .menu-item-97 a>span span:nth-child(8){
      
      }
      
      1 Reply Last reply
      0
      • D
        D
        danny
        wrote on last edited by
        #3

        thanks so much @arminunruh

        Is this right?

        Bildschirmfoto 2024-07-30 um 12.57.42.png

        I included the script. and in css it looks like this:

        }.menu-item-97 a>span span:nth-child(1){
        font-weight: 800!important;
        /instead of font-weight, use font-family: arial1by10-17; CSS/
        }

        Seems it is not applying yet.

        Thanks for the help.
        best, daniel

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

          no its wrong

          u probably did this part wrong:

          "put this in lay options → html at bottom:"

          1 Reply Last reply
          0
          • D
            D
            danny
            wrote on last edited by
            #5

            so everything goes into in lay options → html at bottom ?

            I did, seems it is not applying.
            I tried as well to have the css in → Custom CSS but it doesn't change anything.

            thanks!

            Bildschirmfoto 2024-07-31 um 18.57.42.png

            F 1 Reply Last reply
            0
            • D danny

              so everything goes into in lay options → html at bottom ?

              I did, seems it is not applying.
              I tried as well to have the css in → Custom CSS but it doesn't change anything.

              thanks!

              Bildschirmfoto 2024-07-31 um 18.57.42.png

              F
              F
              felix_rabe
              wrote on last edited by
              #6

              @Danny just put the <script> part in here, the css must go to the "custom css" section. and get rid of the "}" before ".menu-item-97. …"

              1 Reply Last reply
              0
              • D
                D
                danny
                wrote on last edited by
                #7

                thanks @felix_rabe I did, still i don't see its applying. Can you see what I'm missing?

                Bildschirmfoto 2024-08-02 um 19.07.52.png

                Bildschirmfoto 2024-08-02 um 19.07.57.png

                1 Reply Last reply
                0
                • F
                  F
                  felix_rabe
                  wrote on last edited by
                  #8

                  @Danny you have to close every "{" that you opened with a "}". so the one you opened in line 6 misses a closing.

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

                    yea the css needs to go to "css", not "html at bottom"

                    just the javascript needs to go into "html at bottom"

                    css: not closing your css statement with a } sign tells me maybe you need to do a basic css course to learn the basics

                    like this tutorial:
                    https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/CSS_basics

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