Separate menu items by commas instead of spacing?
-
Hey Sam!
I wrote you the code which you need to insert in the Custom javascript area:
<script> window.laytheme.on("newpage", function(layoutObj, type, obj){ jQuery('#menu-item-8a span').after(","); jQuery('#menu-item-16 a span').after(","); }); </script>This is a bit of a dirty fix. but since you do not have many menu points it should be all right.
I noticed that on my testserver it needs some time until the commas appear.
I right now found even a better fix because it is pure CSS:
nav.primary a:after { content: "," !important; } .menu-item-15 a:after { display: none; }It just removes the laqst comma with a
display: none.Weird, that I did not have this idea from the beginning.
So, no jQuery needed!
I still leave the jQuery example above for other people to understand.
Great! I am happy we solved this!
All the best!
Marius
-
-
Wonderful!
-
Thank you so much. This helped me too!
just have an additional question. I want the commas to be white on my front page. I already added a piece of code, so that text is white on my frontpage, but the commas are still black.body.slug-landingpage1 span{
color: white;
}Would be greatful for help!
Thanks
Stella -
and is it possible that the commas in the menu just stay, when i hover over them on for example this page?
http://richterstella.com/about
So just the commas are fixed and don't turn white on mouseover.
Thanks so much!
-
Hi @ute
You need to play with the CSS here:nav.primary a:after { content: "," !important; color: white !Important; }In your example the commas turn white though.
Let me know!
MArius
-
This post is deleted!
-
-
Hi,
I'm trying to achieve a similar menu to this but am not having any luck. aim is to get a / between each menu item, and also a space before and in front, so " / ", the space before the / works, but the one afterwards is being ignored? Also, the last-child part doesn't appear to work either, any ideas are much appreciated?
Thanks, Paul.
nav.primary a:after { content: " / " !important; color: #494949 !Important; } nav.primary li:last-child:after{ content: "" !important; }
-
Hi,
I'm trying to achieve a similar menu to this but am not having any luck. aim is to get a / between each menu item, and also a space before and in front, so " / ", the space before the / works, but the one afterwards is being ignored? Also, the last-child part doesn't appear to work either, any ideas are much appreciated?
Thanks, Paul.
nav.primary a:after { content: " / " !important; color: #494949 !Important; } nav.primary li:last-child:after{ content: "" !important; }
Figured it out using:
nav.primary a:after { content: " /\00a0" !important; color: #494949 !Important; } .menu-item-1945 a:after { display: none !Important; }
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