zschleien
zschleien

Reputation: 11

Apply CSS to a specific class

I want to add specific CSS to the class below. I would like to add cursor: pointer. How would I go about this without adding it to every toggle-transparent class?

<h3 class="toggle-transparent navbar-text pull-right">Handbook</h3> 

Upvotes: 0

Views: 80

Answers (2)

Irvin Zhan
Irvin Zhan

Reputation: 824

If there is only one h3 with toggle-transparent navbar-text pull-right classes, then this will do:

.toggle-transparent.navbar-text.pull-right {
    cursor: pointer;
}

I'd recommend adding another class to it if you are using these three specific classes elsewhere. Something like this might work better

<h3 class="toggle-transparent navbar-text pull-right pointer">Handbook</h3> 

.toggle-transparent.pointer {
    cursor: pointer;
}

Upvotes: 2

Aaroniker
Aaroniker

Reputation: 190

h3.toggle-transparent.navbar-text.pull-right { cursor:pointer; } 

for example

so the h3 tag must have the 3 classes, very specific, but not unique - else you have to add an id or another class

Upvotes: 1

Related Questions