There's a bug with the lesson "Use Attribute Selectors to Style Elements" in Basic CSS courseS

<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>

[type='checkbox'] {
  margin: 10px 0px 15px 0px;

I’m pretty I’ve checked everything but can’t yet get through this challenge as it says " The type attribute selector should be used to select the checkboxes."
Is this a bug?

Challenge: Use Attribute Selectors to Style Elements

Link to the challenge:

New Picture (1)

New Picture (2)

Hello @quan72io , welcome to the forum.

The test will look into the style tag to see a matching result.

Since you have created a new style tag, in may conflict with the tests and behave like it’s not there at all.

Try moving your declaration inside the same style that was already there at the beginning of the lesson, as see if you can pass.

Hope it helps.

1 Like

Thanks for prompt reply! Love you!

Your CSS must be input within the <style> tags at the top of the editor, where the rest of your CSS is.

1 Like

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

1 Like

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