What about:

c2.c1{width: 20px}

?

On Tue, Oct 1, 2013 at 2:55 PM, Chris Rockwell <ch...@chrisrockwell.com> wrote:
> That is why it works that way, yes.
>
> The engine sees two widths, both with the same weight, origin and
> specificity; the last one to be declared will win.
>
> If instead, you did:
>
> div.c1 {width:20em}
> .c2 {width:30em}
>
> The width would be 20em, because div.c1 is more specific.
>
>
> On Tue, Oct 1, 2013 at 2:51 PM, Philip Taylor <p.tay...@rhul.ac.uk> wrote:
>
>>
>>
>> Chris Rockwell wrote:
>>
>> > http://www.w3.org/TR/CSS2/cascade.html#cascading-order
>> >
>> > In your example, width is 30em;
>>
>> > How you assign them in the class attribute has no bearing.
>>
>> OK, so in particular you are referencing this part, I assume :
>>
>> > Finally, sort by order specified: if two declarations have the same
>> weight, origin and specificity, the latter specified wins. Declarations in
>> imported style sheets are considered to be before any declarations in the
>> style sheet itself.
>>
>> Is that correct, Chris ?
>> Philip Taylor
>>
>
>
>
> --
> Chris Rockwell
> ______________________________________________________________________
> css-discuss [css-d@lists.css-discuss.org]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> List policies -- http://css-discuss.org/policies.html
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/



-- 

Tom Livingston | Senior Front-End Developer | Media Logic |
ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.com
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to