Section - CSS does not work

Asked

Viewed 66 times

0

I’m having a problem with the Section of my code. It is all without formatting, I cleaned the browser cache to see if it worked and still not getting CSS.

.newsletter {
  width: 100%;
  float: left;
  text-align: center;
  padding: 3% 4%;
  background-color: #130400;
}

.newsletter h2 {
  font-size: 1.5em;
  color: #fff;
  font-weight: 700;
}

.newsletter h3 {
  color: #fff;
}

.newsletter form {
  margin-top: 2%;
}
<section class="newsletter">
  <h2> Inscreva-se agora! </h2>
  <h3> Receba novidades, dicas e muito mais. </h3>
  <form>
    <input type="email" name="email" placeholder="digite seu email">
    <button> Cadastrar </button>
  </form>
</section>

  • And the console in the browser gives some error?

  • 1

    what do you mean without formatting? see that I put your code in the snippet of the site and has formatting

  • @Ricardopunctual Formatting is not fixed to my 'Section' element in Chrome. I can quickly visualize my css when I press F5, then it disappears and is unformatted. Also test here on the site and the formatting appears.

  • @Leandrade How do I check this? Sorry I’m a beginner.

  • If using Chrome is the key f12 on the keyboard. Keep this in mind, everything you develop with Html, Css and Javascript, has to be with the console open. There that accuses errors.

  • @Thanks for the tip. I tested it on the console and gave the following error in HTML: "Uncaught Syntaxerror: Unexpected token < " , and in CSS:" Uncaught Syntaxerror: Unexpected token . "

  • 1

    Joia Jessica, that’s right, the console is the friend of the front-end dev, always with it open. It shows the file that is with the error and also the file line that is with error. Then just check and fix.

  • Jessica, the console usually shows Javascript and network errors. Vc must be using some error script.

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.