I was wondering why I can't indent the :first-child
of h4
.
All the rest of the h4
elements should not be indented.
The HTML:
<section>
<article id="5">
<h2>Top 7 Best Pheromone Colognes for Men (To Attract Women)</h2>
<h3>2014-01-16</h3>
<!--img src="https://puaction.com/img/thumb/pua-berlin.jpg" width=80 height=80 title="" alt="" -->
<h4>What Are Pheromones And Pheromone Colognes? Naturally, pheromones are odorless substances being excreted externally by the fertile body...</h4>
<h4>What Are Pheromones And Pheromone Colognes? Naturally, pheromones are odorless substances being excreted externally by the fertile body...</h4>
<h4>What Are Pheromones And Pheromone Colognes? Naturally, pheromones are odorless substances being excreted externally by the fertile body...</h4>
<h4>What Are Pheromones And Pheromone Colognes? Naturally, pheromones are odorless substances being excreted externally by the fertile body...</h4>
<h4>What Are Pheromones And Pheromone Colognes? Naturally, pheromones are odorless substances being excreted externally by the fertile body...</h4>
<h4>What Are Pheromones And Pheromone Colognes? Naturally, pheromones are odorless substances being excreted externally by the fertile body...</h4>
<h4>What Are Pheromones And Pheromone Colognes? Naturally, pheromones are odorless substances being excreted externally by the fertile body...</h4>
</article>
</section>
The CSS:
* {
margin:0;
padding:0;
}
section article[id] * {
clear: both;
float: left;
height: auto;
width: 100%;
}
section article[id] h2 {
color: #bbb;
}
section article[id] h3 {
color: #aaa;
}
section article[id] h4 {
text-align: justify;
}
/* THIS IS NOT WORKING !!! */
section article[id] h4:first-child { /* :first-of-type */
text-indent: 10px;
}
The jsFiddle demo.