The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Modifying a class on :focus ? Reply To: [Solved] Modifying a class on :focus ?


You can’t go UP the DOM with a CSS selector so given that your current structure has the input after the label means that you cannot affect it with :focus.

If you can change the markup order you’d be OK otherwise you’d need javascript.