html css make hover change other elements code example Example: css hover affect other item #container:hover ~ #cube { background-color: yellow; }