7. Let's .focus()!



Codecademy says I have passed, however when I focus the outline still changes to blue rather than red.



That's because #FF0000 is red, not blue.

Source: color-hex.com


That's what I mean. I've asked it to change to red (i.e. #FF0000), but it's still changing to blue for some reason that I can't figure out. :slight_smile:


Could you provide a screenshot please?


I've hovered my pointer over the bar in the screenshot below:


Does your CSS establish a set border color? If not it might just be a glitch.


I think it's just a glitch. Thanks for your help : )


Getting the same here. My script.js is:
But no red on the outline-color. I believe it turning blue is default browser behavior. I tried other things like adding a div to HTML and changing it's background-color and that didn't work either...


It might be a browser thing. I'm not too familiar with IE or Edge or whatever it's called now.

You can try using CSS and giving the input box a pseudo-selector or pseudo-event (I can't quite recall what their official name is) to make it turn red on hover or click.


perfectly working and changing colour to red


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.