4. Nesting Selectors


#1



https://www.codecademy.com/en/courses/learn-sass/lessons/hello-sass/exercises/nesting-sass?action=resume


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; 
  }
}


#2

Hi,

Is this for 4. Nesting Selectors no 1 ?

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


#3

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


#4

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


#5

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


#6

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
}

#7

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.


#8

Facing the same problem here.


#9

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


#10

Facing the same problem as well.


#11

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.


#12

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


#13

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.


#14

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