Here I mentioned "greater than" (or "bigger than") selector, but while I was reading SMACSS I realized that I don't understand some selectors good enough.
So, here are my examples taken from SMACSS.
Same HTML I am going to use, but with different CSS:
<!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="/css/index.css"> <meta charset="UTF-8"> <title></title> </head> <body> <div id="sidebar"> I am a sidebar div <div> and I am inner div <div> and I am third level div </div> </div> </div> </body> </html>
1. With "greater than" selector:
CSS:
#sidebar>div { border: 1px solid #333; }
Looks like this:
2. With space
CSS:
#sidebar div { border: 1px solid #333; }Looks like this: