css affect parent from child code example
Example 1: styles for parent of selector
Short answer: no such selector exists. Use JavaScript
Long answer: by Kaotik below
Example 2: how to select elements from a parrent element css
// select all p elements with div as parent
div > p {
background-color: yellow;
}