4. Nesting Selectors



I get this error: Did you nest and apply the properties to .slogan? Why is the code below incorrect?

.banner {
  font-family: 'Pacifico', cursive;
  height: 400px;
  background-image: url("lemonade.jpg");
    .slogan {
        position: absolute;
        border: 4px solid black;
        top: 200px;
        left: 25%;
        width: 50%;
        height: 200px;
        text-align: center; 



Is this for 4. Nesting Selectors no 1 ?

I don't see why you getting an error, try refreshing the page.


Yes it is for 4. I have tried refreshing the page. Super frustrating!


Urm I suggest reset lesson -> help - reset exercise. I'm afraid you might loose previous lessons not sure :slight_smile:


I am also getting an error and I have the same code (without the tab in front of .slogan)


Because ".slogan" must be located inside the ".banner"

.banner .slogan{
  position: absolute;
  border: 4px solid black;
  top: 200px;
  left: 25%;
  width: 50%;
  height: 200px;
  text-align: center


That's what the produced CSS would look like, not how the SCSS should be written.

It seems that multiple people have had this "bug". I reset the lesson and it added code for the remaining part of the lesson, but still didn't compile. I posted a bug query with Codecademy and then logged off. I came back the next day, just tried to hit compile and it worked. If you want to give this a shot then hopefully it helps you fix it as well.


Facing the same problem here.


I compiled my code in Firefox and it worked! Can't figure why it didn't in Chrome though.


Facing the same problem as well.


I had the same problem. In Opera, I first tried yesterday and did it correctly but it told me it was wrong and nothing I tried worked. I signaled as a bug. Today I tried again, same thing, so I reset the code and I could tell that what it reset it to is the answer to all 3 exercises, but it still turned red.
This thread made me want to try in another browser (Safari) and I just clicked Run, didn't change anything and it worked for all 3... Something is off obviously.


Same issue for me using Chrome (in standard browser and in incognito mode, fwiw) and same resolution using Firefox.


Nevermind, it bugged for me again at page 6, I logged out and in for the nth time and could finally reset it to the original code and redid the whole chapter which worked well this time, all in Safari.


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