Chanakya
Chanakya

Reputation: 75

Add CSS to Active class

This might be an easy go for the designers but I'm finding it hard to apply a CSS styling to it.

<li id="tab2" class="labelRow active"><a href="/name/lbl1#tabs-2"><span>Some Text</span></a></li>

Pls tell me the CSS class for it to apply style when it is having active class.

Upvotes: 0

Views: 75

Answers (3)

parkeragee
parkeragee

Reputation: 313

This is the selector you would use.

.labelRow.active {
  /* styles here */
}

Upvotes: 0

rockStar
rockStar

Reputation: 1296

if the .labelRow.active{} try li .active{}

Upvotes: 0

Tims
Tims

Reputation: 2007

To apply a style to the whole li:

.labelRow.active {
  /* your styles*/
}

for just the span:

.labelRow.active span {
  /* your styles*/
}

note the lack of space between .labelRow and .active.

Upvotes: 2

Related Questions