When Style sheets go bad- how to clean up a CSS mess

Discussion in 'CSS' started by local-realtor, Mar 27, 2007.

  1. #1
    I am working on a redesign for a large site. They are switching CMS and we have a huge mess of styles with overlapping properties.

    The whole thing is Messed Up*

    Anyone have any good resources on how to deal with this kind of thing?

    Suggestions or even just moral support works for me:)
     
    local-realtor, Mar 27, 2007 IP
  2. jared

    jared Peon

    Messages:
    231
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well if it is really screwed up, you are going to have to just suck it up and most likely correct it by hand.

    Otherwise you can try http://isnoop.net/tools/css.php. It organizes and optimizes your css.

    cheers
     
    jared, Mar 28, 2007 IP
  3. local-realtor

    local-realtor Guest

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Whats the best way to deal with overlapping styles?

    Does anyone have a good resource on CSS best practices?
     
    local-realtor, Mar 30, 2007 IP
  4. Josh Inno

    Josh Inno Guest

    Messages:
    1,623
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'm afraid I don't have any links to that, but generally the best thing to do, in my personal opinion and experience, is to pull the style information as high as you can, and still have it make sense. For example, if all of the text in the "header" section of the page inside a "header" div is supposed to be a particular color (with a few exceptions maybe), then pull that text color property all the way up to the header, and then only work with text colors on the exceptions.

    Of course if they have <p> colors and <span> colors for even the defalt spans and colors, this can create a bit of a headache until you have it sorted out.
     
    Josh Inno, Mar 30, 2007 IP