View Full Version : CSS <h1> etc. font problem


Laogeodritt
12-19-2004, 06:17 PM
I suspect this is problems with my CSS...

I'm having some trouble with the &lt;h1&gt; tags and such. Although the size is fine, the color also, the font refuses to appear. Please note that this is on a the local system and this file is not meant to be seen on the internet; this is for a page with links to commonly-visited websites for my convenience.

Note that I've seen this in other files I created, but these are all on a local scale. Also note that the font is currently installed on my computer and is significantly different from those such as Arial and Times.

The following is the stylesheet:

<style type="text/css">

A:link
{ text-decoration: underline; color:#0000FF; }
A:visited
{ text-decoration: underline; color:#660066; }
A:active
{ text-decoration: underline; color:#FF0000; }
A:hover
{ text-decoration: underline overline; color:#FF0000; }


h1 {font-family: Lucida Calligraphy; color: #000000; size: 18pt }

h2 {font-family: Lucida Calligraphy; color: #000000; size: 15pt }

h3 {font-family: Lucida Calligraphy; color: #000000; size: 12pt }

p {font-family: Times New Roman; color: #000000; }



body
{ background:#FFFF99; font-family: Times; color: #000000 ; size: 12pt; }

</style>

But, when I use the following code, the title appears as black 18pt but it is NOT Lucida Calligraphy (note that the table continues on after this extract):

<table width=98% border=0><tr><td colspan="2"><center><h1>Index</h1></center></td></tr>

Can anyone identify the cause of this?


Thanks,
Laogeodritt

pb&j
12-19-2004, 06:54 PM
1. if you are using an external style sheet, take out the STYLE tag set.

2. SIZE should be FONT-SIZE.

Laogeodritt
12-19-2004, 07:14 PM
1. if you are using an external style sheet, take out the STYLE tag set.

2. SIZE should be FONT-SIZE.
1. It's not an external stylesheet.
2. Thank you.

3. That still doesn't help with the font problem.

MaGiCSuN
12-19-2004, 07:58 PM
he also said if ;)

normally i would say post the url but since it isn't for others to see it's not really nessecary. Anywayz, are you sure the name is spelled properly?

also try this:

font-family: 'Lucida Calligraphy';

if it still doesn't work then post the whole html of the page and we'll take a look at it :)

love,
Mirna

Laogeodritt
12-19-2004, 11:07 PM
No, that doesn't work.

Here's the page's code. I've modified anything that isn't to be seen (which is just text, not code).

Please note that I am still working on this, so some table cells might be empty or have "1234567890" in them. These are those I hadn't gotten to yet.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Index for [snip]</title>

<style type="text/css">

A:link
{ text-decoration: underline; color:#0000FF; }
A:visited
{ text-decoration: underline; color:#660066; }
A:active
{ text-decoration: underline; color:#FF0000; }
A:hover
{ text-decoration: underline overline; color:#FF0000; }

background-color: #FFFF99;

h1 {font-family: Lucida Calligraphy; color: #000000; font-size: 18pt }

h2 {font-family: Lucida Calligraphy; color: #000000; font-size: 15pt }

h3 {font-family: Lucida Calligraphy; color: #000000; font-size: 12pt }

p {font-family: Times New Roman; color: #000000; }



body
{ background:#FFFF99; font-family: Times; color: #000000 ; font-size: 12pt; }

</style>
</head>
<body>
<br>
<table width="98%" border="0">
<tr>
<td colspan="2">
<center>
<h1>Index</h1>
</center>
</td>
</tr>
<tr>
<td><br></td>
</tr>
<tr>
<td><br></td>
</tr>
<tr>
<td colspan="2">
<center>
<h2>Index for all users</h2>
</center>
</td>
</tr>
<tr>
<td width="49%" bgcolor="#000099">
<center>[SNIP LINK AND IMAGE]</center>
</td>
<td width="49%" bgcolor="#000099">
<center>[SNIP LINK AND IMAGE]</center>
</td>
</tr>
<tr>
<td width="49%" bgcolor="#3399FF">
<center>[SNIP LINK AND IMAGE]</center>
</td>
<td width="49%">
<center>[SNIP LINK AND IMAGE]</center>
</td>
</tr>
<tr>
<td><br></td>
</tr>
<tr>
<td colspan="2">
<center>
<h2>Index for user [SNIP]</h2>
</center>
</td>
</tr>
<tr>
<td width="49%" bgcolor="#000099">
<center>[SNIP IMAGE AND LINK]</a></center>
</td>
<td width="49%" bgcolor="#000099">
<center>[SNIP IMAGE AND LINK]</center>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td colspan="2">
<center>
<h2>Index for user [SNIP]</h2>
</center>
</td>
</tr>
<tr>
<td width="49%">
<center>1234567890</center>
</td>
<td width="49%">
<center>1234567890</center>
</td>
</tr>
<tr>
<td><br></td>
</tr>
<tr>
<td colspan="2">
<center>
<h2>Index for user [SNIP]</h2>
</center>
</td>
</tr>
<tr>
<td width="49%">
<center>1234567890</center>
</td>
<td width="49%">
<center>1234567890</center>
</td>
</tr>
</table>
<!-- [SUPER LONG REMINDER WAS HERE] -->
</body>
</html>

pb&j
12-19-2004, 11:20 PM
in the code you provide, you have an error here...

A:hover
{ text-decoration: underline overline; color:#FF0000; }

background-color: #FFFF99;

h1 {font-family: Lucida Calligraphy; color: #ff0000; font-size: 18pt }

it does not seem to be belonging to any css command. just in space there.
take that part out and things seem to work a bit nicer.

Laogeodritt
12-19-2004, 11:27 PM
in the code you provide, you have an error here...

A:hover
{ text-decoration: underline overline; color:#FF0000; }

background-color: #FFFF99;

h1 {font-family: Lucida Calligraphy; color: #ff0000; font-size: 18pt }

it does not seem to be belonging to any css command. just in space there.
take that part out and things seem to work a bit nicer.
I could've sworn I took that out... hm, maybe it was in another file.

It works! Thanks for pointing that out!

pb&j
12-19-2004, 11:33 PM
no worries. glad it finally worked out for ya.
:D

Monkey Bizzle
12-20-2004, 04:55 AM
random comment: that's odd that it wasn't in the first bit of code you posted...

Laogeodritt
12-21-2004, 01:56 PM
random comment: that's odd that it wasn't in the first bit of code you posted...

Good observation. Maybe I forgot to save when I took that out in the original file? Or... maybe I had removed it in the TEST.html file, which I'd been using to try things around with this problem, yet never did the change in the original file?

OH, well, it matters not. Thanks for the help, everyone.