I have a website that I am building, and I am doing a menubar for it.
My problem is that, I created separators between the menus, and I wish that the last menu option would not have the separator.
Code of the CSS:
div#menu ul {
top:5px;
position: relative;
list-style-type: none;
height: 80px;
width: 900px;
margin: auto;
}
div#menu li{
float:left;
}
div#menu ul a {
position: relative;
background-image: url(divider.png);
background-repeat: no-repeat;
background-position: right;
padding-right: 49px;
padding-left: 49px;
display: block;
text-decoration: none;
font-family: Verdana;
font-size: 14px;
color: #001B24;
}
div#menu ul > li:last-child {
background-image: none !important;
}
This is the Html:
<ul>
<li><a href="#">Bemutatkozó</li></a>
<li><a href="#">Kínálatunk</li></a>
<li><a href="#">Referenciáink</li></a>
<li><a href="#">Kapcsolat</li></a>
<li><a href="#">Előjegyzés</li></a>
</ul>
I tried everything, but the background image wont go away on the last child. Please help 🙂
Thx in advance!
The image appears to be on the
adescendent elements of thelielements, not theliitself. That said, you could try, instead: