1

I created a div containing a dropdown select box. I have set focus to the div by giving tabindex="0". When the div is focused, the border outline is not having rounded corners just as the dropdown box has. How do I change the css property of div when focused.

<div id="test" tabindex="0" class="blablabla">

Tried adding css properties by

div#test: focus {
    background: white;
    outline: none;
    border-color: black;
}

Thanks for your help!!!

andreas
  • 16,357
  • 12
  • 72
  • 76
user4196837
  • 111
  • 2
  • 6

1 Answers1

0
div#test: focus {

should be

div#test:focus {

focus on a div is hacky though. See this:

Using :focus to style outer div?

Community
  • 1
  • 1
François Constant
  • 5,531
  • 1
  • 33
  • 39