| Question about nesting css selectors syntax
|
nelsonm

msg:4471775 | 3:22 pm on Jul 2, 2012 (gmt 0) | hi all, when nesting css selectors, which of the following is the proper syntax... are no spaces between nested selectors valid | div.class3, #id1#id2, .class1#id3, #id4.class2 {} |
| or does there always have to be a space between nested selectors... | div .class3, .class4 div, #id1 #id2, .class1 #id3, #id4 .class2 {} |
|
|
lucy24

msg:4471813 | 4:57 pm on Jul 2, 2012 (gmt 0) | div.class3 div .class3 mean different things. The first is <div class = "class3"> blahblah </div> The second is <div-of-any-kind> <anything class = "class3"> blahblah </anything> </div>
|
ergophobe

msg:4471815 | 4:59 pm on Jul 2, 2012 (gmt 0) | A space indicates that it is part of the cascade; no space does not div.class3 refers to a div tag with a class attribute of "class3" div .class3 should refer to a div tag that has a child of class3 and might be the same as, for example, div.class1 p.class3
|
nelsonm

msg:4471872 | 6:25 pm on Jul 2, 2012 (gmt 0) | Ok thanks.
|
|
|