Lee
Well-known member
I have a question about CSS.
I have one element that I am styling. Lets say something like:
h3 {
background: blue;
padding: 10px;
font-size: 1.1em;
}
I then have another element that I want to inherit the previous classes style but also have its own style information. For example:
h3.classname {
background: pink;
}
When I apply this class name the background colour of my H3 tag remains blue. How can I tell the class to override the default styling of the element?
Cheers,
Lee
I have one element that I am styling. Lets say something like:
h3 {
background: blue;
padding: 10px;
font-size: 1.1em;
}
I then have another element that I want to inherit the previous classes style but also have its own style information. For example:
h3.classname {
background: pink;
}
When I apply this class name the background colour of my H3 tag remains blue. How can I tell the class to override the default styling of the element?
Cheers,
Lee