hi
I had a navbar which came in as part of an Ethos template installation. In the end, it was easier to replace the navbar with one created with the Header Builder in Pro, except one issue arose.
I initially had the following code to put a box shadow above the navbar items
.x-navbar .desktop .x-nav > li > a:hover, .x-navbar .desktop .x-nav > .x-active > a, .x-navbar .desktop .x-nav > .current-menu-item > a {
box-shadow: inset 0 4px 0 0 #fe5000;
}
This was Ok, but I wanted to have the shadow only be the width of the text, so was kindly assisted by Nabeel with this code
.x-navbar .desktop .x-nav > li > a:hover > span, .x-navbar .desktop .x-nav > .x-active > a > span, .x-navbar .desktop .x-nav > .current-menu-item > a > span {
box-shadow: inset 0 4px 0 0 #fe5000;
}
.x-navbar .desktop .x-nav > li > a > span {
padding-top: 10px;
}
I altered the padding to a negative to get exactly the result I required.
But now having the navigation bar created in the Header Builder, the selectors have all changed. I have been able to get the box shadow above each item with this
.x-menu > li > a:hover, .x-menu > .x-active > a, .x-menu > .current-menu-item > a {
box-shadow: inset 0 4px 0 0 #fe5000;
}
It also worked if I used .x-menu-inline
in the code
The downside is the line to have the code make the width only that of the word, did not work with either selector and I am wondering if anyone has an idea of the correct syntax. Here is what I tried
.x-menu > li > a:hover > span, .x-menu > .x-active > a > span, .x-menu > .current-menu-item > a > span {
box-shadow: inset 0 4px 0 0 #fe5000;
}
.x-menu > li > a > span {
padding-top: 10px;
}
I also tried it with .x-menu-inline, but neither of them worked.
Any suggestions on the correct selector/s to affect the width of the box shadow?
Thanks in advance