CSS selector


#1

Hy! I have a problem with this exercise:

https://www.codecademy.com/courses/learn-html-css/lessons/ids-classes-divs/exercises/id-selectors?action=lesson_resume

I don't understand where i put the ID selector for header-text. I saw the comment, but i tried to put the code under the comment, but it's not working. I tried to put the code above the comment, on his line and still does not work. Please help me anybody


#2

It should go right underneath the comment. I have a line inbetween mine in spacing but I don't believe that should matter. Mind posting a screenshot of how your code looks right now? I can help you out if I can see your code! :smiley:


#3

This is my code. I put the ID selector under the comment but it's not working. What is wrong? Please help me.


#4

/* Add the ID selector to this CSS rule */

 #header-text{
  margin: 0 auto;

So you shouldn't need more { } since you are adding it to the ID so just like for example h1 is set up the header-text will be in the same manner.


#5

Make sure to place a closing brace at the end. :smiley:


#6

Haha yes please do! I was just showing the beginning set up of course since that is where the main problem was xD :stuck_out_tongue:


#7

OMG! It's working. It was so simple that I never realized. Thank you guy. :smile:


#8

No problem! Glad to have helped and happy coding! :smiley:


#9

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