PDA

View Full Version : Css text style sheet not loading


Dawg
10-09-2007, 10:27 PM
I can't see where I've gone wrong. All brackets checked, but a validator tells me this---font-family: Arial;--- contains an error.
I've loaded a sheet with font sizes and colours, but only the White colour sizes load. (Not Green or Red), all sizes/styles of White OK, none in other colours OK.
A clue for the clueless please..

Jittor
10-10-2007, 12:36 AM
Can you post a link or your CSS code?

Dawg
10-10-2007, 07:25 AM
I've put it on the index page here;
www.venal.me.uk

Thanks

Jittor
10-10-2007, 03:23 PM
Why do you have so many classes with the same name? Can you post the HTML code so we can see how you are adding it to your page.

Also, I usually specify more than 1 font for it to default to if the user does not have Arial. For validation purposes it usually likes this as well.

Example:
font-family:Arial, Helvetica, sans-serif;

Dawg
10-10-2007, 04:56 PM
The html is:

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

If there is a shortcut to having arial in font sizes 12 to 36, normal, bold, italic; black, red, gray and white; I'd be very thankful for your pointing me in the right direction.
Thanks.

Jittor
10-10-2007, 05:08 PM
I don't think so. The thing is, all your classes are named the same so there is really no way for the browser to understand which class you want when they are all the same name. It's like yelling out the name John at an international John Convention. Try adding a number or letter at the end of the class.

For example:

.Ten1BG
.Ten2BR

That would be good for font size 10, Bold and Green. this will also help you find the CSS for that class faster.

Also, I mean the HTML for your whole page (or part of it) so we can trouble shoot the error, not the HTML that links the CSS file.

Dawg
10-10-2007, 05:45 PM
Code here:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>core1</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<link href="../Arialcore.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><img src="../Images/Banner.gif" alt="banner" width="800" height="150" /></td>
</tr>
</table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center">
<td colspan="5" bgcolor="#FFFF33"><span class="c16">&nbsp;&nbsp;&nbsp;</span><span class="c16green"><a href="../index.html">the core</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="../process.html">process</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="../egrab.html">e-grabbing</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="../blogbaiting.html">blogbaiting</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="../seo.html">seo</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="../cohesion.html">cohesion</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="../contact.html">contact</a></span></td>
</tr>
<tr align="center">
<td colspan="5">&nbsp;</td>
</tr>
<tr valign="top">
<td width="150" align="center"><!-- TemplateBeginEditable name="left" --><!-- TemplateEndEditable --></td>
<td width="1" align="center" bgcolor="#FFFF00">&nbsp;</td>
<td width="495"><table width="485" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><!-- TemplateBeginEditable name="main" --><!-- TemplateEndEditable --></td>
</tr>
</table></td>
<td width="1" bgcolor="#FFFF00">&nbsp;</td>
<td width="150"><table width="140" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><!-- TemplateBeginEditable name="right" --><!-- TemplateEndEditable --></td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p>
<p class="b14greyital">&nbsp;</p>
</body>
</html>


The class thing: I'm using Dreamweaver and each class shows in the size, style and colour it represents in design mode. I'm using design mode as you might have guessed I'm (ahem) not much at code.

Dawg
10-11-2007, 06:52 PM
It was the class names. When I followed your advice it all appeared.
Thanks very much.