I have a client who wants an image (a roof) to appear over each top line menu items, but not over sub-menu items. They want the roof to stay in place if that menu item is active.
I have a process that works but it requires manual creation of CSS for every new menu item, supposing the menu item is .item-136 and the sub menu item is .item-137, then I have the following CSS:
.item-136.active {
background-image: url("https://independentliving.scottsproject.org.uk/images/web/Roof.png"

background-repeat: no-repeat;
background-position: 50% 0%;
}
.item-136 a:hover {
background-image: url("https://independentliving.scottsproject.org.uk/images/web/Roof.png"

background-repeat: no-repeat;
background-position: 50% 0%;
}
.item-137 a:hover {
background-image: none;
}
I am sure if I put a class ("roof"

.roof.active {
background-image: url("https://independentliving.scottsproject.org.uk/images/web/Roof.png"

background-repeat: no-repeat;
background-position: 50% 0%;
}
.roof:hover {
background-image: url("https://independentliving.scottsproject.org.uk/images/web/Roof.png"

background-repeat: no-repeat;
background-position: 50% 0%;
}
Any help would be greatly appreciated
Kind regards
Peter