CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   What does +div and + div mean? (http://www.codingforums.com/showthread.php?t=275197)

johnsmith153 10-04-2012 10:33 PM

What does +div and + div mean?
 
I think this is targetting an old version of IE:
Code:

+div {
}

..but what is this:
Code:

.class1 + div, .class2 + div {
}

Thanks for any help. I'm sure this is simple.

felgall 10-04-2012 11:10 PM

E + F Matches any F element immediately preceded by a sibling element E.

So the CSS you are asking about is targetting the div immediately following the end of an element that has class="class1" or class="class2"

for example the div in the following code:

<p class="class1">text</p><div>something</div>


All times are GMT +1. The time now is 01:22 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.