PDA

View Full Version : AArrgh! Can't get css working, please help.


psiron
01-22-2008, 10:19 AM
Hi everyone,

I'm looking for some help with a css issue please.

I'm not new to dreamweaver, I have been designing sites since the days of Ultradev but to be honest I never put much emphasis on CSS.

My problem is now I am trying to switch to cs3 from MX but the css doesnt seem to be working? The3 code below is a sample of the code produced from cs3 and I would love it if somebody could tell me why this isn't working?

If I remove the doctype then the code works?

main.css

.10pxblack {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: normal;
color: #000000;
text-decoration: none;
}


index.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="10pxblack">Why isn't my css working? Arrghhhhhh!!</td>
</tr>
</table>
</body>
</html>


Can anyone shed any light on why this isn't working properly please?

Thanks in advance,

JJ

d a v e
01-22-2008, 11:48 AM
you shouldn't use numbers in your class names or at least shouldn't start them with numbers
and it's better to define something by its function rather than its appearances: i.e. use something like

tabletext rather than
10pxblack which is 14px in your stylesheet (and what then when you change it to dark grey and it's no longer black?? ;)