Sandy Clark Teaches CSS and Structured Markup

Sandy Clark is writing a series for Fusion Authority on building sites using CSS. She is using pages from my site as examples, deconstructing them, and them, gradually converting them over to structured CSS. The first part of her series is now online.

2 responses to “Sandy Clark Teaches CSS and Structured Markup”

  1. tony petruzzi Avatar
    tony petruzzi

    One of the things that I noticed in here article is that she wants to use 1 big stylesheet for the redesign of the pages.
    Personally I would go with having mutliple stylesheets for a couple of reason.
    1) The CSS validator said to keep your stylesheets under 4K. By putting them in one big file, it will likely go over this size.
    2) Maintainence. It’s would be easier to put all the common elements in one stylesheet called common.css and then put the elements that are exclusive for each section in their own stylesheet. This way if you wanted to change the font from Arial to Verdana, you would just have to edit the value in one stylesheet inside of both. I know that this is a bad example, but your get the idea.
    3) Browser compatability. If you are one of those people that take the time to make sure that your site looks good in every browser out there (and I’m not one of them), it would be easier to have the common elements in one stylesheet and then the element that are exclusive to let’s say Konquer in another. Personally if it looks good in IE6 and FireFox, that’s enough for me.
    The biggest gripe that I have with CSS is the way that FireFox and IE6 differ from the way that they determine the width of block level elements. FireFox takes into account everything when determining the width, suck as border, margin and padding. IE6 only count border and padding.
    If anyone out there knows how to solve this problem, please reply.

  2. John Avatar

    1) under 4k true. one could also say since the css file is cached the file size might not matter. of course if you don’t cache anything that doesn’t hold true.
    2) if style sheets are written properly you will be able to change the font in one place like
    body {font-family: Verdana, Arial, Helvetica, sans-serif;}
    all elements will use this unless you declare a new font for an element
    it’s not css, its the way IE renders the css. Here’s a box hack
    more css
    one of many ‘Writing Efficient CSS’

Leave a Reply