I have a problem which I’m not too sure how to solve. It’s a joomla menu and I’m trying to style a span which resides inside a span with a class. Take this code:
So I’m trying to style the span which is in blue. I’ve tried the following code:
.separator span {
styles
}
Which in turn, styles both span elements and breaks the look in IE8/9. I need to know how to style just the inside span, which I assume requires a different selection with CSS. With the way the menu works I cannot give the inner span a class as far as I know.
if you wanted to target ALL spans WITHIN any element named .separator .separator span{}
If you anted to target ONLY DIRECT CHILDREN of .separator that are span ( and dont mind not supporting IE6) I would suggest you use: .separator>span {}
BTW .separator span:first-child {} will only target spans in .separators that are the FIRST ELEMENT (not the first of type, as that a different pseudo class ) within their respective container.