tags:

views:

66

answers:

3

Is there a way to shift focus to a div by default through pure css and not using javascript?

Thanks in advance..

+3  A: 

No CSS does not offer anything on focus. I know you said no JavaScript, but how easy:

document.getElementById('div').focus();
Dustin Laine
+2  A: 

No, it isn't.

In normal circumstances a div can't receive the focus at all, and CSS lacks anything to set the focus.

David Dorward
A: 

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.

pixeltocode