I am currently trying to add arrow indicators on my navigation menu for items which have submenu options.
Currently I am using this CSS:
.mainNav li > a:after {
color: #444;
content: ' ▾';
}
But this adds a dropdown arrow to every <li>
regardless of if there is a submenu or not. Is there a way with just CSS to only add this arrow to items that have sub-items?
Thanks!
li
– Showmanshipcontains child
selector. – Pruinosecontent: ' ▾';
isn't doing you any good. Use the margin or padding css properties if you want cross-browser whitespace. – Injure