#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    PBC Clubhouse
    Posts
    75
    Rep Power
    12

    css doesn't work


    below is my style.css file

    <STYLE type="text/css">
    .ivy{background-color:#E0E0E0;}
    .required{font-family:"courier";font-size=10px;font-weight:bold;font-color:#AA0000;}
    .selectTag_emp{font-family:"courier";font-width:400;font-weight:bold;font-color:#AA0000}
    </STYLE>


    below is my sample.html file

    <TABLE BORDER=1 WIDTH="80%" CELLSPACING=0>
    <TR>
    <TD CLASS="ivy">
    <%= sFirstName+" "+sLastName%>
    </TD>
    </TR>
    </TABLE>

    i don't understand why my css doesn't work? i've been checking my syntax and everythine seems to be ok. pls help thanks!
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,009
    Rep Power
    2791
    font-size=10px
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    26
    Rep Power
    0
    If you are saying that your style.css file is a seperate file from the .html file, REMOVE the opening and closing <style> tags. They are not required in the style sheet.

    Then, in the <head> tag of your .html file, link to the style sheet.

    <link rel="stylesheet" type="text/css" href="your_path/your_style_sheet.css" />

    ...also, you need to fix that font size rule.
    Last edited by fathomgringo; August 21st, 2003 at 07:09 PM.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2003
    Posts
    1,014
    Rep Power
    15
    Besides the 'font-size=' error:
    .font-color is invalid; you probably mean to say: color
    .underscores are not allowed in class names; a hyphen - is allowed

    Please check with the W3C CSS Validator (saves a lot of time):
    http://jigsaw.w3.org/css-validator/validator-text.html

    Jeroen
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    PBC Clubhouse
    Posts
    75
    Rep Power
    12

    thanks!!!!


    it works!!!!

IMN logo majestic logo threadwatch logo seochat tools logo