I'd like to understand how CSS selectors work with property collisions. How is one property selected over another one?
div { background-color: red; } div.my_class { background-color: black; } div#my_id { background-color: blue; } body div { background-color: green; } body>div { background-color: orange; } body>div#my_id { background-color: pink; }
hello
How does selector priority work?