3
I have this HTML structure:
<body>
<header>
</header>
<div class="limit">
<section class="conteudo">
<header>
<h1>TESTE</h1>
<h3></h3>
</header>
<article>
</article>
</section>
<section class="comentarios">
</section>
</div>
<footer>
</footer>
</body>
And this CSS style sheet:
/* header principal - topo da pagina */
header{
background:#FE634A;
border-bottom:2px solid #D24726;
width:100%;
height:100px;
}
section.conteudo{
width:960px;
height:200px;
}
/* tag header da section.conteudo - titulo do artigo*/
section.conteudo header{
width:960px;
height:200px;
}
What happens?
The 'Section.content header' selector inherits the 'header' attributes which is something that I do not happen, what do I do to prevent this? Some elegant solution so that this does not happen?
In case my site is getting like this:
you know? I didn’t find it so elegant to have to use body > header to do this, is there any other solution to this? Or this is the best?
– heromax
@heromax Personally, I would go with the classes. But I have no reason, objective or not, to choose between one and the other... Except, with classes, you can style different elements the same way if you want.
– mgibsonbr
Maybe yes, I change, but I will use that you answered, thanks for the help! : ) I marked as solved! Now yes the page is the way I wanted it. vlw ae.
– heromax