Focus - code passes, but doesn't work


#1


https://www.codecademy.com/courses/web-beginner-en-JwhI1/1/3?curriculum_id=50a3fad8c7a770b5fd0007a1#

Aargh. Can someone help explain why this code IS passed by code academy, but DOESN'T actually change the text box to red? My text box stays baby blue.

I'm using the Safari browser on a Mac if that helps...


$(document).ready(function(){
    
    $('input').focus(function(){
        
        $(this).css('outline-color', '#FF0000');
        
    });    
})


#2

Hi Peter,

This worried me for a minute too, because I know my code should have fully worked, but it didn't :slight_smile:

But looking at the exercise, it says this:

03. Not all browsers have equal CSS implementation. So for this lesson, if you are using Firefox, you will need to first change the outline-style to solid.

And I was able to confirm that adding the line

outline-style: solid;

to the input rule in the CSS file made the outline show up :slight_smile: Are you using Firefox?


#7

This topic is inactive.