Is there a way to shift focus to a div by default through pure css and not using javascript?
Thanks in advance..
Is there a way to shift focus to a div by default through pure css and not using javascript?
Thanks in advance..
No CSS does not offer anything on focus. I know you said no JavaScript, but how easy:
document.getElementById('div').focus();
No, it isn't.
In normal circumstances a div can't receive the focus at all, and CSS lacks anything to set the focus.
although it depends on what you're trying to achieve, you could apply a :hover
pseudo-class on a div if you want to visually highlight it.