How can I remove the border from last menu item?
I tried,
.elementor-1785 .elementor-element.elementor-element-8e7245e
.elementor-nav-menu .menu-item a:last-child {
color: #333333;
background-color: #f0f0ed;
border-style: solid;
border-width: 0px 1px 0px 0px;
border-color: #0274be;
}
but no luck. my site is https://******.dk. (url removed)
I’m using elementor plugin, & also added a custom class “noborder” on the last menu item
3
Answers
Use
instead of
You are looking for the last child
li
not the last childa
We don’t need border as the just last item will cover the border for us.
Try to use :last-child selector.
You will get a full description and tested way here , so that next time no worry anymore 🙂
https://www.w3schools.com/cssref/sel_last-child.asp