I've just solved a problem on a page, but I don't understand why the  
solution works, and that bugs me, so I wonder if someone kind could  
fill in the blanks for me?

Page in question: http://www.sandbox.sharkattack.co.uk/tempo/index.php

In the CSS, starting around line 331, I had the following:


#sidebar {
        font-size: 0.8em;
        line-height: 1.5;
        }
#sidebar p {
        margin-bottom: 1em;
        }

For some reason that I can't fathom, the first rule wouldn't take at  
all. Adding an !important declaration to the #sidebar rule made no  
difference. The CSS validator (via Web Dev Toolbar) gave the error:

Parse error - Unrecognized  */ #sidebar { font-size: 0.8em; line- 
height: 1.5; }

...I wasn't sure what to make of that. The solution, it turned out  
(after banging my head against it for way too long) was to swap the  
two rule around, thus:

#sidebar p {
        margin-bottom: 1em;
        }
#sidebar {
        font-size: 0.8em;
        line-height: 1.5;
        }

It worked, but I'll darned if I can see why. Presumably it's a  
specificity issue, but the declaration properties for the two rules  
don't conflict, so I can't see why one should interfere with the other.

Obviously I'm missing something, but could someone shed some light so  
I don't run aground on this reef again?

Thanks;
--
Rick Lecoat

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
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