- This topic has 20 replies, 3 voices, and was last updated 6 years, 11 months ago by
Tom.
-
AuthorPosts
-
November 13, 2018 at 10:06 am #726487
Harris
Hello,
Two questions about the menu.1. How can I add dashes between the menu items in main horizontal menu?
2. How can I call the (ajax) search functionality by clicking in an icon placed in the header widget (but not in the menu)?Thanks
HarrisNovember 13, 2018 at 3:30 pm #726701Tom
Lead DeveloperLead DeveloperHi there,
1. You could try something like this:
.main-navigation .main-nav > ul > li:not(:last-child) a:after { content: " - "; position: relative; right: -20px; }2. I don’t believe this is possible, unfortunately.
November 14, 2018 at 8:39 am #727276Harris
Thanks Tom!
November 14, 2018 at 9:03 am #727287Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
February 3, 2019 at 9:16 am #800311Harris
Hello,
To go a little bit further with that, can the dashes be replaced with a small image or an icon and how?
Thanks
HarrisFebruary 3, 2019 at 4:47 pm #800525David
StaffCustomer SupportHi there,
are you using any font icon libraries like Font Awesome?
February 3, 2019 at 11:33 pm #800661Harris
Yes I am using font awsome but it does not include the icon I want to use.
So I will need to add either a custom svg or a png.February 4, 2019 at 5:31 am #800849David
StaffCustomer SupportThe content property supports images e.g:
content: url(image.jpg);link to it an appropriate sized image.February 4, 2019 at 10:19 am #801220Harris
Thanks David!
I guess I will have to properly adjust the
right: -20px;
in order to match it with the image size.Can I somehow position the image in order to vertically adjust it with the text? Or is the “position relative” enough?
February 4, 2019 at 5:22 pm #801513Tom
Lead DeveloperLead DeveloperYou should be able to position it quite easily. Any chance you can show us what you have so far?
February 4, 2019 at 11:54 pm #801683Harris
Hello Tom,
Its not online yet. I will update the topic once it will be.
Thanks a lot!
April 11, 2019 at 9:53 pm #866747Harris
Hello,
I added the image. Can you please help me position it like that
https://i.gyazo.com/d9fb4ac2772293f3635d9adfd189b52d.png
related to the menu items (text)?Thanks
April 12, 2019 at 5:16 am #867025David
StaffCustomer SupportYou can try some
margin-top: -10px;on the content property to move them up.April 12, 2019 at 5:50 am #867043Harris
Ηello,
Is that the selector I have to add the margin to?
.main-navigation .main-nav > ul > li:not(:last-child) a:after(it’s the one containing the content property)
If so, I am adding it like that but it doesn’t seem to move (I actually want to move it down).
@media (min-width: 768px) { .main-navigation .main-nav > ul > li:not(:last-child) a:after { margin-top: -20px; content: url(https://deyaph.gr/deyaph/wp-content/uploads/2019/04/Dash.png); position: relative; right: -11px; } }April 12, 2019 at 6:56 am #867185David
StaffCustomer SupportInstead try using
top: 10px;– and yes in that CSS. -
AuthorPosts
- You must be logged in to reply to this topic.