André
André

Reputation: 25554

Selecting a DIV using multiple classes in multiple levels

I have this HTML:

<div class="row-fluid list-item-main-euvou-entradas">
    <div class="span1 list-item-main-euvou-entradas-colorcode green"></div>
    <div class="span1 list-item-main-euvou-entradas-rank">1</div>
    <div class="span1 list-item-main-euvou-entradas-votes">Votos</div>
    <div class="span9 list-item-main-euvou-entradas-content">
        <a href="#">some link</a>
        <p>some text...<p>          
    </div>
</div>

I need to select this class "span1 list-item-main-euvou-entradas-colorcode green" using also this classes in the selector "row-fluid list-item-main-euvou-entradas".

Ive tried something like this, but does not work:

.row-fluid .list-item-main-euvou-entradas .span1 .list-item-main-euvou-entradas-colorcode .green {
    some css code;
}

Any clue on this one?

Best Regards,

Upvotes: 0

Views: 3517

Answers (2)

Codegiant
Codegiant

Reputation: 2150

you can try this:

CSS CODE

   div.row-fluid.list-item-main-euvou-entradas div.span1.list-item-main-euvou-entradas-colorcode.green {
       /*some css code*/
        color:red;
    }

Upvotes: 1

Ibu
Ibu

Reputation: 43810

You need to remove the spaces between the class:

.row-fluid.list-item-main-euvou-entradas .span1.list-item-main-euvou-entradas-colorcode.green {
    some css code;
}

so for the parent div (2 classes)

.row-fluid.list-item-main-euvou-entradas

and the child (3 classes)

.span1.list-item-main-euvou-entradas-colorcode.green

Upvotes: 5

Related Questions