0
I have the following HTML code:
<ul class="grid_1330 margin-auto">
<li class="homeListagemLi">
<div class="homeListagemDiv">
<ul>
<li><img src="./imagens/pessoa.jpg" height="220" width="220" /></li>
<li><span>teste1</span></li>
<li><span>teste2</span></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</li>
</ul>
So is my CSS:
.homeListagemDiv>ul>li>img{width: 220px;height: 220px;}
.homeListagemDiv>ul>li>span{
color: #00aeef;
font-size: 15px;
font-family: "open_sansbold";<sp
}
I want when, the span
be the second, there inside the LI, it accepts another format, different from the one I put in the CSS. Of course, I could create a class and put in the li
, but there is another way?
That Rodrigo. I want the word test2, to have different attributes, but I didn’t want to create another class for this, I wonder if to reuse.
– Felipe Viero Goulart
From @felipestoker, the second example I gave works in your case, what you can’t do is take the second span that appears "loose" there inside ul.
– Rodrigo Siqueira