Images as menu items
-
-
Dear @jw
this is not possible easily. You need to come up with a creative solution for this. CSS…
Best!Marius
-
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 -
Dear @jw
Can you post a link to your website?
We will then have a look and inspect that!
Many wishes!
Marius -
-
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 -
Hey Marius,
this kind of worked. Now all of the menu points have the text overlaid. So now two questions arise:
-
How can I make the original text disappear?
-
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 -
-
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
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