Possible Duplicate:
Inherit CSS class
Does CSS support inheritance ?
Assuming we have:
.base
{
}
.class1 :base
{
}
.class2 :base
{
}
How can I make class1 and class2 contain all styles which exist in base?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
CSS doesn’t support inheritance in the class sense of the word, but is based on specifity and order. If you define a common set of properties for classes class1 and class2, and then specialize as needed.