I’m having trouble with the ID selectors
https://www.codecademy.com/courses/learn-html-css/lessons/ids-classes-divs/exercises/id-selectors?action=lesson_resume
instructions are
In style.css, add a class selector for the ID header-text.
it gives me an error and says “Did you add the ID selector?”
this is what i put
#header-text
{
}
I added the selector it wants but it doesn’t let me move on.
Take a look at the comment and the code in lines 15
- 23
:
/* Add the ID selector to this CSS rule */
{
margin: 0 auto;
position: relative;
text-align: center;
top: 25%;
width: 60%;
}
You have to specify selector for this rule. So it should be:
/* Add the ID selector to this CSS rule */
#header-text {
margin: 0 auto;
position: relative;
text-align: center;
top: 25%;
width: 60%;
}
2 Likes
system
closed
#5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.