Having issues with my website's navbar display on PC and mobile
Having issues with my website's navbar display on PC and mobile
I have limited coding skills, and built a portfolio website for myself utilizing WordPress, a pre-built theme called Ocean WP, and the Elementor plugin. The problem that I was facing earlier was that my nav menu had an arrow to indicate a drop down menu on one of my pages.
I really didn't like how this looked, so I reached out to Wordpress Support for help, and was given this CSS code to input:
/* eliminate dropdown arrow */
.elementor-navigation .menu-item-has-children > a:after {
display:none;
}
While the code has worked to remove the arrow, it's left my nav menu with an uneven space. Additionally, I'm not sure how to make this code work on tablet/ mobile devices because the arrow still shows up.
I apologize, thank you for sharing these resources with me. I am new to this site, and will make sure my future questions fits within the guidelines!
– inky_biscuits
Jul 2 at 1:34
1 Answer
1
You've hidden the arrow, but not the extra spacing for it.
Here's the css without spacing and arrow:
.elementor-navigation .eldropdown-toggle {
display: none;
}
.elementor-navigation .menu-item-has-children > a {
margin-right: 0;
}
@media screen and (min-width: 56.875em)
.elementor-navigation .menu-item-has-children > a {
padding-right: 1em;
}
}
I would recommend you to keep the dropdown arrows though.
Thank you so much! And any particular reason why I should keep the drop down arrows? I'm not disagreeing or anything, but do you think it looks or functions better this way? I just found it a bit awkward on mobile is all.
– inky_biscuits
Jul 2 at 1:15
@inky_biscuits So your visitors know that there are actually sub items to your navigation without hovering over each menu item. Also there is no hover on mobile so your users won't be able see those sub pages.
– Furkan Poyraz
Jul 2 at 7:03
That makes sense, thank you for the input. And yes, I noticed that on mobile after I put the code in. I will keep the drop down arrows then. Thank you again for you help.
– inky_biscuits
Jul 2 at 16:22
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Please provide a Minimal, Complete, and Verifiable example. Please look at guide how do I ask a good question?
– Andrzej Ziółek
Jul 1 at 20:01