So, where:
<p class="information more-styles">
what I was wondering (I should have worded better, sorry) was if I took:
.information
{
background-color: #FFF;
color: #000;
}
/* This below, will apply only to the paragraph with the more-styles class
applied to it */
.more-styles
{
color: #333;
}
and applied to both of those paragraph (through the classes), which is the
last paragraph. The first paragraph has only one class assigned to
it...whereas, the last paragraph has 2 classes assigned: the first class
assigned, i.e. information, contains the formatting (the formatting applied
is the background-color, and the font's color (color)) that will apply to
all the paragraphs with that class assigned to them (it); the last class
assigned, i.e. more-styles, will change only the font's color in that
particular paragraph...
Is what the style you have applied, like if I had done this instead of what
is applied at the top?:::
.information.more-styles
{
styles: here;
}
--
Brett P.
On Mon, Feb 23, 2009 at 9:57 AM, Matthew Pennell
<[email protected]>wrote:
> On Mon, Feb 23, 2009 at 2:18 PM, Brett Patterson <
> [email protected]> wrote:
>
>> Note the space in the second paragraph class attribute...from what I have
>> heard this allows multiple classes to be applied to a single element. Is
>> there a downfall to applying multiple classes to an element, like the one
>> above? How does it affect UAs?
>
>
> There are no negative effects to applying multiple classes to a single
> element. The only problem is when you try to style an element that matches
> two (or more) classnames, e.g.:
>
> #content .primary.highlighted {
> background: #ff0;
> }
>
> That will work in Firefox/Safari, and apply the rule to any element with
> both the "primary" and "highlighted" classes; but in IE6 it doesn't work, it
> will just see it as .highlighted.
>
> - Matthew
>
>
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: [email protected]
> *******************************************************************
>
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [email protected]
*******************************************************************