August 21st, 2003, 04:42 PM
css doesn't work
below is my style.css file
below is my sample.html file
<TABLE BORDER=1 WIDTH="80%" CELLSPACING=0>
<%= sFirstName+" "+sLastName%>
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!
August 21st, 2003, 04:47 PM
August 21st, 2003, 07:07 PM
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.
August 21st, 2003, 07:20 PM
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):
August 22nd, 2003, 10:54 AM