Is my CSS code ok?

Discussion in 'HTML & Website Design' started by artemijs, Dec 30, 2006.

  1. #1
    Hi! I made a portfolio and I wnated to know is my CSS code is ok?? :confused:
    Adress: http://www.studija.moirass.com
    Thank you! ;)
     
    artemijs, Dec 30, 2006 IP
  2. Angelus

    Angelus Well-Known Member

    Messages:
    1,622
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    138
    #2
    You can check your css using w3c validator....

    p.l.u.r.
     
    Angelus, Dec 30, 2006 IP
    Smyrl likes this.
  3. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you're looking for CSS validation, nothing beats http://jigsaw.w3.org/css-validator/

    As for your particular stylesheet, aside from mixing font metrics (percentages, pixels and EM values), it doesn't look that bad. I'd ditch the margin: 0; and padding: 0; declarations from your various style rules and replace them with a universal selector, then declare them from there. It would go at the top of your stylesheet, before any other rules:
    
    * {
        margin: 0;
        padding: 0;
    }
    
    Code (markup):
    This will remove the margins and padding from virtually every element in your HTML document, so you will have to re-apply margins and padding where you want them (yes, it's that powerful). Also, Arial is a font with only one word, so you can safely ditch the quotation marks that are around it.

    Aside from using the background shorthand property to shorten up your background (whatever) styles, and using some formatting in your stylesheet, I'd say you're off to a pretty good start :).
     
    Dan Schulz, Dec 31, 2006 IP
  4. thinkdj

    thinkdj Peon

    Messages:
    114
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    it looks fine in IE and FF .. btw, nice site design .. simple and elegand .. congrats
     
    thinkdj, Jan 1, 2007 IP
  5. serversidescripter

    serversidescripter Banned

    Messages:
    69
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    it would be nice if you separate css and java script code with your HTML code
     
    serversidescripter, Jan 2, 2007 IP