Being background!

Hola chicos! me encuentro haciendo el primer proyecto y quisiera colocar un fondo a la página pero a pesar de usar “GradientCSS” no logro que entre el color. No sé si mi código se olvido de algo o si debería de cambiar algo por el estilo…

$brandColor: dark;

body {
  #fondo{
    color: #7e40d5;
  }
  font-family: sans-serif;
  background: linear-gradient(to bottom, $brandColor, darken($brandColor, 15%));
  color: white;
  height: 200px;
  margin: 3;
  display: grid;
  place-items: center;
 
}
#main {
  color: blue;
  font-family: Impact;
  font-weight: 15px;
}
p {
   color: black;
  font-family: arial;
  font-weight: 15px;
}
#theend{
  height: 10px;
    color:orange;
    font-family: arial;
}

It’s easier to help if you provide a link to your whole project rather than a snippet of code.

1 Like

https://codepen.io/pabloeoliveros/pen/poyOpOZ Here is it!

@pabloeoliveros, there are many errors in your code. I’ll start with this;

  • Codepen provides the boilerplate for you. It only expects the code you’d put within the body element in HTML. (No need to include the body tags). For anything you want to add to the <head> element click on the ‘Settings’ button, then HTML and add it into the ‘Stuff for <head>’ box.

You have this in your HTML, <body #fondo>. This is not how you declare an id in HTML. And from the above, we know the body element is incorrectly placed.
This, <footer id=theend>, in your HTML is closer to how an element is declared but the id name needs to be in quotes.

A hint if you’re working on the first project, the Tribute page. Keep the test script when forking the pen (<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>).

  • The test script should be included, with all tests passing, when you submit your projects.
  • Complete the user stories one at a time and then style your page.
1 Like

Ok! entonces, debo resolver eso cuanto antes ;).
Ahora, como debo de utilizar el “script de prueba” apenas termine? O sea, en que parte del código pues?

You can place the test script in the HTML section of codepen.

1 Like

Thanks for all of it Roma!