/    Sign up×
Community /Pin to ProfileBookmark

determine a class for a class

there is a way to do this i just cant remember how ?
something like :

.kkk {
[class=’anotherclass’]
}

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@NogDogOct 23.2005 — Well, not sure what you're trying to accomplish, but you can define 2 classes to have the same attributes, then notate the differences as:
<i>
</i>.anotherclass, .kkk {
/* define attributes that are the same */
}
.kkk {
/* define attributes that are different for class kkk */
}

Alternatively, you can assign two classes (not two IDs) to an element:
<i>
</i>&lt;div class="anotherclass kkk"&gt;
Copy linkTweet thisAlerts:
@ofirauthorOct 23.2005 — NOPE !! not what i mean...

to clear my intention :

.example { font-size: 20px; }

#someid[img="ganjah"] { [B]class="example"[/B] }
Copy linkTweet thisAlerts:
@NogDogOct 23.2005 — No, I've never seen anything quite like that. Can you explain what functionality you are trying to accomplish with it?
Copy linkTweet thisAlerts:
@drhowarddrfineOct 23.2005 — What he's doing is selecting by attribute so #someid[img="ganjah"] { class="example" } means when #someid has an img equal to ganjah then class=example. I'm not sure, though that you can change classes but I just don't recall.
×

Success!

Help @ofir spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...