Log in

View Full Version : This is the first time I have seen this



ajfmrf
04-07-2014, 06:43 AM
In a css file I came across this for the first time

.slider > .widget > li, .slider > .widget > li > img
.slider > .widget > li > img { opacity: .6 }
.slider > .widget > li > blockquote
.slider > .widget > li > blockquote > credit
.slider > .widget > li > blockquote > credit:before

Can someone explain what the > are doing? And how does it affect things?

coothead
04-07-2014, 11:37 AM
Hi there ajfmrf,


The ">" is a child selector. ;)


E > F Matches any F element that is a child of an element E.

Further reading:-


CSS Selectors (http://www.w3.org/TR/CSS21/selector.html)


coothead

jscheuer1
04-07-2014, 02:28 PM
See also (more specifically):

http://www.blooberry.com/indexdot/css/syntax/selectors/element.htm#child