Forums
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I’m not sure I understand what’s going on here but it seems like you’re asking a shorthand way of styling an anchor element in your sub classes?
IF I understand your markup correctly you can do this: http://jsfiddle.net/Wh6np
Yes and no. The following is what I want to do:
.style-class .sub-class1 a, .style-class .sub-class2 a { /* styling here */ }
But wasn’t sure if there was an shorter way to write it so I don’t have to keep repeating the ‘.style-class’ and ‘a’
What does the markup look like?
Hmm, I guess I’d have to see what it looked like in the end to make a proper judgment on CSS.
@wolfcry911 @djpic What is wrong with simply using this?
.style-class a {
text-decoration: none;
}
Why do you need to be any more specific than that (in this case)?
unless sub-class1 is different than sub-class2, you don’t have to be specific.
Yes, there are other anchors in the other .sub-classes which is why they are separate. Otherwise I would use just .style-class a{}. The code for what I was doing is up on the other discussion FYI: Pure CSS Calendar – Opinions Needed.