On Mar 2, 2011, at 8:45 PM, Keith Purtell wrote:

I asked an excellent Web designer to critique my site, and he created a whole new style sheet that made it look better. The problem was, there were some lines of code he included that I didn't understand. Obviously I need to know what every line of my CSS does, so here are some examples of what he wrote. As for why I don't ask him to explain it, he's been very impatient with me when I asked that type of question.

The first example is figuring out the logic of when to use ! important ...
ul#navlist li.inCat em, ul#navlist li em, ul#navlist li.inCat strong {
    display: block;
    font-style: normal;
    font-weight: 700 !important;
    color: #675645;  /* was 000 */
    padding: 6px 0 6px 30px !important;
}

Nothing really too complicated about that CSS. !important is often used for diagnostic reasons or to override previous styles
 The latter is likely what he's using it for.


Second example looks like a hack for IE6 but not sure what it's trying to accomplish with that 1% ... * html ul#navlist li a, * html ul#navlist li.inCat em, * html ul#navlist li.inCat strong {
    height: 1%;
}


Can't really be sure without looking, but my guess is he might have been trying to manage a layout bug or 2 between browsers. Best bet, take it out and see what happens.
--
--
You received this because you are subscribed to the "Design the Web with CSS" 
at Google groups.
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to