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. Images as menu items

Images as menu items

Scheduled Pinned Locked Moved General Discussion
8 Posts 2 Posters 1.4k 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.
  • J
    J
    jw
    wrote on last edited by
    #1

    Hello,

    I would like to replace my menu items with custom images. Is this possible? I feel like I saw the feature somewhere some time...

    Best
    Julius

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

      Dear @jw
      this is not possible easily. You need to come up with a creative solution for this. CSS…
      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • J
        J
        jw
        wrote on last edited by
        #3

        Dear Marius,

        I tried a bit of CSS butt have been struggling since I don't have too much knowledge in this field. From what I've gathered online, this could be the CSS to replace the Menu item:

        text-indent: -100em;
        overflow: hidden;
        background: url(http://spandau20.com/wp-content/uploads/2020/05/mixtapes.png) no-repeat;
        

        How can I address the menu item in my code? Using [data-id="161"] {...} was unsuccessful :(

        spandau20.com is the website.

        Cheers!
        Julius

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

          Dear @jw
          Can you post a link to your website?
          We will then have a look and inspect that!
          Many wishes!
          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0
          • J
            J
            jw
            wrote on last edited by
            #5

            Hi Marius,

            it is spandau20.com

            Thank you!

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

              Dear @jw
              play around with this:

              nav.primary li {
                  display: inline-block;
                  background: url(http://spandau20.com/wp-content/uploads/2020/05/mixtapes.png) no-repeat;
                  background-size: contain;
              }
              

              Best!
              Marius

              www.mariusjopen.world

              1 Reply Last reply
              0
              • J
                J
                jw
                wrote on last edited by
                #7

                Hey Marius,

                this kind of worked. Now all of the menu points have the text overlaid. So now two questions arise:

                1. How can I make the original text disappear?

                2. How can I select only a single menu point? I tried with selecting via

                [data-id="161"]{
                ...
                }
                

                and modifying yours to

                nav.primary li menu-item-233 {
                    display: inline-block;
                    background: url(http://spandau20.com/wp-content/uploads/2020/05/mixtapes.png) no-repeat;
                    background-size: contain;
                }
                

                but that was not successful.

                Best,
                Julius

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

                  Dear @jw
                  you cannot use data attributes to assign CSS.
                  I would recommend to have a look into some tutorials at Codeacademy https://www.codecademy.com/.
                  It is for free for the basics. The effect you are trying to achieve requires some knowledge and brainpower :-)
                  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
                  Ingi
                  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