Hi Ciaran,
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" on the Link Class of just the top menu item, then I can't understand why the following does not work: the hover piece works but not the active.
.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
- bibbp
- Commercial Templates
- Tuesday, 15 January 2019
- Subscribe via email
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!