Help Needed - Sass: Nest CSS with Sass

Tell us what’s happening:

Your code so far


<style type='text/sass'>
.blog-post {


  h1 {
    text-align: center;
    color: blue;
  
  p {
    font-size: 20px;
  }
}
}
</style>

<div class="blog-post">
<h1>Blog Title</h1>
<p>This is a paragraph</p>
</div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36.

Challenge: Nest CSS with Sass

Link to the challenge:
https://www.freecodecamp.org/learn/front-end-libraries/sass/nest-css-with-sass

Error
Your code should re-organize the CSS rules so the h1 and p are nested in the
.blog-post parent element.

Hello and welcome to the forum! :slightly_smiling_face:

What I see that could be the potential problem is related to the curly braces in the CSS. You did a correct job to nest the two elements within the .blog-post. However, one of the nested element is being nested AGAIN.

hope this clue will help you out. :slight_smile:

1 Like

the h1 and the p tag should be nested in the blogpost seperately. What you have done here is you nested the p tag in the h1

2 Likes

That was the problem, thanks a lot :+1:.