.current { } #main-menu { } p { } h1 { } https://www.w3schools.com/cssref/css_selectors.asp div > p { } .current + li { background-color:blue; } .current ~ li { background-color:red; }