title: CSS selector is selecting all p elements in page
body: <p>I have a page and I want to style all the <code>&lt;p&gt;</code> elements inside a class. The problem is that, instead styling only the selected <code>&lt;p&gt;</code>, it's styling all the <code>&lt;p&gt;</code> elements in the page. I didn't find any open tags, so I don't know what's going on. Here's the commented codes:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#mainTips {
    float: left;
    width: 60%;
  }
  
  .dicas {
    position: relative;
    display: inline-block;
    background-color: #2980b9;
    width: 10em;
    margin-left: 2em;
    margin-top: 1em;
  }
  
  /* Here's where i'm styling the elements */
  
  .dicas h3,
  p {
    font-family: 'Ubuntu', sans-serif;
    font-weight: lighter;
    text-align: center;
    color: #ecf0f1;
  
  }
  
  .dicas p {
    font-size: 0.8em;
    margin-top: 6.5em;
  }
  
  .dicas:nth-of-type(1) {
    background-image: url("../img/tip1.jpg");
    background-size: cover;
    background-repeat: no-repeat;
  }
  
  .dicas:nth-of-type(2) {
  
    background-image: url("../img/tip2.jpg");
  
    background-size: cover;
  
    background-repeat: no-repeat;
  
  }
  
  #othTips {
  
    margin-top: 1em;
  
    width: 100%;
  
  }
  
  #othTips img {
  
    float: left;
  
    margin-left: 2em;
  
    width: 9.5em;
  
    height: 10em;
  
    margin-bottom: 3em;
  
  }
  
  .description {
  
    position: absolute;
  
    background-color: #2980b9;
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="pt-br"&gt;
  
  &lt;head&gt;
    &lt;meta charset="UTF-8" /&gt;
    &lt;title&gt;Rebecca Bueno&lt;/title&gt;
    &lt;!-- Chamando o CSS e as fontes do Google --&gt;
    &lt;link href='https://fonts.googleapis.com/css?family=Ubuntu:500' rel='stylesheet' type='text/css'&gt;
    &lt;link href='http://fonts.googleapis.com/css?family=EB+Garamond' rel='stylesheet' type='text/css'&gt;
    &lt;link href="css/main.css" rel="stylesheet" /&gt;
    &lt;link href="css/dicas.css" rel="stylesheet" /&gt;
    &lt;link href="css/media.css" rel="stylesheet" /&gt;
    &lt;link href="css/animations.css" rel="stylesheet" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;h1&gt;Rebecca Bueno&lt;/h1&gt;
  
    &lt;div id="menu"&gt;
      &lt;!-- Início menu --&gt;
      &lt;ul&gt;
        &lt;a href="index.html"&gt;
          &lt;li&gt;Home&lt;/li&gt;
        &lt;/a&gt;
        &lt;a href="tend.html"&gt;
          &lt;li&gt;Tendências&lt;/li&gt;
        &lt;/a&gt;
        &lt;a href="dicas.html"&gt;
          &lt;li&gt;Dicas&lt;/li&gt;
        &lt;/a&gt;
        &lt;a href="contato.html"&gt;
          &lt;li&gt;Contato&lt;/li&gt;
        &lt;/a&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
    &lt;!-- Fim menu --&gt;
  
    &lt;!-- I want to style only that p element. --&gt;
    &lt;div id="mainTips"&gt;
      &lt;section class="dicas"&gt;
        &lt;article&gt;
          &lt;h3&gt; Dicas para... &lt;/h3&gt;
          &lt;p&gt;
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
          &lt;/p&gt;
        &lt;/article&gt;
      &lt;/section&gt;
    &lt;/div&gt;
    &lt;div id="othTips"&gt;
      &lt;a href="#"&gt;
        &lt;img src="img/bg2.jpg" /&gt;
      &lt;/a&gt;
      &lt;!-- But it's also styling here --&gt;
      &lt;div class="description"&gt;
        &lt;p&gt;Descrição da dica&lt;/p&gt;
      &lt;/div&gt;
      &lt;a href="#"&gt;
        &lt;img src="img/bg2.jpg" /&gt;
      &lt;/a&gt;
      &lt;a href="#"&gt;
        &lt;img src="img/othtm2.jpg" /&gt;
      &lt;/a&gt;
      &lt;a href="#"&gt;
        &lt;img src="img/othtm2.jpg" /&gt;
      &lt;/a&gt;
      &lt;a href="#"&gt;
        &lt;img src="img/tm4.jpg" /&gt;
      &lt;/a&gt;
      &lt;a href="#"&gt;
        &lt;img src="img/tm4.jpg" /&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  
    &lt;div id="footer"&gt;
      &lt;!-- Rodapé --&gt;
  
    &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;!-- Chamando o JavaScript --&gt;
  &lt;script src="js/styles.js"&gt;&lt;/script&gt;
  &lt;script src="js/pgMan.js"&gt;&lt;/script&gt;
  &lt;script&gt;
    window.onload = function() {
      carregaFundo("bg");
      slideImg();
      lgSld(["Teste da legenda da primeira imagem.",
        "Teste da legenda da segunda imagem.",
        "Teste da legenda da terceira imagem.",
        "Teste da legenda da quarta imagem."
      ]);
    }
  &lt;/script&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>