Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Let's Practice Selectors!

Podrig Leoghain
Podrig Leoghain
5,094 Points

"Change background color of submit button when active" correct solution only works when in different area of workspace

Stuck for about half hour, first through my own need to try to answer without help, then after looking at moz/w3 docs, then after, in desperation, asking stack etc. Finally thought I'd type the solution into a different area of workspace, and it worked straight away. Maybe a bug somewhere. Quite infuriating.

Mike Hatch
Mike Hatch
14,940 Points

You haven't provided the code you were struggling with.

Podrig Leoghain
Podrig Leoghain
5,094 Points

input[type="signal"] { foo }

but it started happening on every question so I think the workspace was bugged. Gave up and just read through to make sure I understood what was required without inputting.

Mike Hatch
Mike Hatch
14,940 Points

It could have been buggy just at the time you were using it. Is it still doing it now several hours later? If it is, it is best to click on the Support link above. We are Community.

Podrig Leoghain
Podrig Leoghain
5,094 Points

Still wasn't working so contacted support. They told me they ae only for billing and account issues, etc., and that if there was a problem on a course to ask the community... lol

Mike Hatch
Mike Hatch
14,940 Points

Padraig,

Take a second look. Over to the right on the Support page there is an email link specifically titled "Report a bug." Is that the one you tried?

I'm also going to tag Steven Parker at this point to see what he says since you already contacted Support.

3 Answers

Podrig Leoghain
Podrig Leoghain
5,094 Points

I made a mistake in writing signal instead of submit last night, tired mind and eyes. I wrote the correct answer in a different part of the workspace and it worked:

input[type="submit"]:active {
  background-color: red;
}

input[type="text"]:focus {
  border: 10px blue;
}

However, if I tried writing anything in the workspace after line 42 it would immediately colour anything typed in a red background, indicating error. Thing is, I'm really glad I stuck with this as I've learnt a very valuable lesson...

I looked over the code again so that I could copy/paste my answer... and found this:

main a:hover {
  color: lightgreen;
  background-color: orange;


.copyright {
    font-size: 5px;
  }

/* 
 Change the background color of the submit button when active.
 Check teacher's notes for resources on this part of the challenge. */
input[type=""]

I'd missed an end bracket for main a:hover which seemed to be the culprit for the red errors. I feel a bit silly.

The input[type... was red in the workspace but the .copyright style wasn't red? Why would that be?

Steven Parker
Steven Parker
231,236 Points

The ".copyright" selector would be interpreted as a syntax error and ignored.

Podrig Leoghain
Podrig Leoghain
5,094 Points

The answers from other people were correct in what they were saying generally but there were certain points that needed addressing for my specific (noob) case.

Steven Parker
Steven Parker
231,236 Points

Some folks might think that marking your own comments as "best answer" implies that you felt that no answer given had any value to resolving your issue at all.

Steven Parker
Steven Parker
231,236 Points

:bell: Hi, I got alerted by Mike's tag.

Your solution has the type as "signal" instead of "submit", and it is lacking the ":active" pseudo-class in your selector.

At about 1:40 in the video this solution is shown:

input[type='submit']:active {
    background-color: firebrick;
}

And yes, the Support folks are perhaps a better resource after a thorough research effort indicates that there seems to be something wrong with the course or website itself. The Forum is still your best bet for assistance like this.

Mike Hatch
Mike Hatch
14,940 Points

Ah! No wonder. I thought he was reporting an issue with his Workspace not working properly. My account is paused at the moment and didn't read it any further than a Workspace bug. Thanks, Steven.

input[type=submit]:active {
background-color: firebrick;
} 


/*Give the text field a blue border upon focus*/ 


input[type=text]:focus
{
  border: solid blue; 
}

this took my an eternity it felt like. My code won't work with input [type="submit"] only works for me without the quotes. tricky.