Forum Moderators: not2easy

Message Too Old, No Replies

CSS having no affect?

CSS having no affect in FF3 or IE8

         

rdunne

8:08 am on Apr 12, 2009 (gmt 0)

10+ Year Member



I am trying to create change the colour of a table data cell using CSS, but it's not having any affect on my HTML in either FF3 or IE8
I have two files, Maths_Tables.html and maths_tables.css, both in the same dir.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
My CSS is header linked with
<link href="maths_tables.css" type="text/css" rel="stylesheet" />
My HTML code is
<td class="colours">0</td>
My CSS code is
<style type="text/css">
.colours { background-color: silver}
</style>

Any help appreciated.

rdunne

9:02 am on Apr 12, 2009 (gmt 0)

10+ Year Member



Not sure if its related of not but I can see both files Maths_Tables.html and maths_tables.css in localhost/projectfolder/ and with http://127.0.0.1/projectfolder but I can't open Maths_Tables.html http://localhost/projectfolder/project.html, it displays a blank page. I have also validated my CSS against CSS 2.1
Any ideas?

[edited by: swa66 at 3:39 pm (utc) on April 12, 2009]
[edit reason] unlink [/edit]

rdunne

9:17 am on Apr 12, 2009 (gmt 0)

10+ Year Member



Please ignore last post thanks

swa66

3:56 pm on Apr 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd avoid adding the <style> tags in the CSS file when it is linked, they are syntax errors in the CSS file.