View Full Version : font in external style sheet...


jessi15
12-05-2003, 02:20 AM
What are the fonts we can use? I realized we can't use the regular fonts we could put if we didn't have a style sheet.

Alcy
12-05-2003, 02:26 AM
You can use any font, but if the person looking at your site doesn't have it, they'll see their default font....

jessi15
12-05-2003, 02:42 AM
Originally posted by Alcy
You can use any font, but if the person looking at your site doesn't have it, they'll see their default font....

I don't think so because I tried that and it was still the default font that showed up. I tried using cancun.

Alcy
12-05-2003, 03:24 AM
Do you have cancun on your computer? Do you mind posting the code your using?

jessi15
12-05-2003, 12:01 PM
Yup, I have cancun. Here's the code.

BODY
{scrollbar-DarkShadow-Color:#E3F8FF;
scrollbar-Track-Color:#E3F8FF;
scrollbar-Face-Color:#E3F8FF;
scrollbar-Shadow-Color: #81D3F7;
scrollbar-3dLight-Color:#81D3F7;
scrollbar-Highlight-Color:#E3F8FF;
scrollbar-Arrow-Color:#E3F8FF;
font-style: normal;
font-variant: normal;
font-weight: normal;
font-size: 12px;
font-family: Arial;
background-color:#E3F8FF;
background-image=url('bg.jpg');
background-repeat:repeat-x;
color:#81D3F7;
cursor: crosshair;
margin:0;}

A:link {text-decoration: none; font-weight:bold;color:#81D3F7}
A:visited {text-decoration: none; color:#81D3F7}
A:active {text-decoration: none; font-weight:bold;color:#81D3F7}

a:hover
{
color:#81D3F7;
text-decoration: overline underline; }

.head
{color:#81D3F7;
font-weight: bold;
padding-left: 0px;
font-size: 12px;
border-top: 1 solid #81D3F7;
border-bottom: 1 solid #81D3F7;
}

td
{color:#81D3F7;
font-weight: plain;
padding-left: 0px;
font-size: 12px;}



.outline
{
valign: top;
border: 1 solid #81D3F7}

kittycat
12-05-2003, 04:05 PM
You don't have cancun set as the font anywhere in that code. Change it so that there is and then see if it works. If most of your text is in tables, add the font code to the td section as well.

BODY
{scrollbar-DarkShadow-Color:#E3F8FF;
scrollbar-Track-Color:#E3F8FF;
scrollbar-Face-Color:#E3F8FF;
scrollbar-Shadow-Color: #81D3F7;
scrollbar-3dLight-Color:#81D3F7;
scrollbar-Highlight-Color:#E3F8FF;
scrollbar-Arrow-Color:#E3F8FF;
font-style: normal;
font-variant: normal;
font-weight: normal;
font-size: 12px;
font-family: Arial;
background-color:#E3F8FF;
background-image: url('bg.jpg');
background-repeat:repeat-x;
color:#81D3F7;
cursor: crosshair;
margin:0;}

jessi15
12-05-2003, 10:22 PM
I posted the original css. Here's mine that I sorta modified.

BODY
{scrollbar-DarkShadow-Color:#E3F8FF;
scrollbar-Track-Color:#E3F8FF;
scrollbar-Face-Color:#0492DA;
scrollbar-Shadow-Color: #81D3F7;
scrollbar-3dLight-Color:#0492DA;
scrollbar-Highlight-Color:#0492DA;
scrollbar-Arrow-Color:#0492DA;
font-style: normal;
font-variant: normal;
font-weight: normal;
font-size: 12px;
font-family: cancun;
background-color:#E3F8FF;
background-image=url('bg.jpg');
background-repeat:repeat-x;
color:#81D3F7;
cursor: crosshair;
margin:0;}

A:link {text-decoration: none; font-weight:bold;color:#0492DA; cursor:crosshair}
A:visited {text-decoration: none; color:#0492DA}
A:active {text-decoration: none; font-weight:bold;color:#0492DA}

a:hover
{
color:#0492DA;
text-decoration: overline underline; }

.head
{color:#0492DA;
font-weight: bold;
padding-left: 0px;
font-size: 12px;
border-top: 1 solid #0492DA;
border-bottom: 1 solid #0492DA;
}

td
{color:#0492DA;
font-weight: plain;
padding-left: 0px;
font-size: 12px;}



.outline
{
valign: top;
border: 1 solid #0492DA}

As you can see, i put cancun, but it still wont work. I was thinking that maybe there are only certain fonts we can use. My site is on freewebs.com. Maybe because its on the internet we can only use fonts EVERYONE would have. What do you think?

jessi15
12-05-2003, 10:50 PM
THIS IS DRIVING ME BANANAS :apple: (and apples)!!!!

I went on other websites and did what they said but it is just not working!

kittycat
12-06-2003, 12:13 AM
Could you post a link to the page? There might be something else affecting it.

This line in your CSS also needs to be changed:
background-image=url('bg.jpg');
Change the = to a :

jessi15
12-06-2003, 12:31 AM
it is www.freewebs.com/jessi15

I'm using someone elses layout that I found.

kittycat
12-06-2003, 02:58 AM
In the code for the page there's this:
<basefont face="Arial" color="">

Try removing that and see what happens.

And because all of your text is in tables, you might have to add the font-family code into the td section for it to work.

hockyfan641
12-06-2003, 03:29 AM
If you're using font-family: it's best to put some other fonts in there incase they don't have that font. Then a secondary font will show up.

And because all of your text is in tables, you might have to add the font-family code into the td section for it to work.

nope, if you put css in the body section of your style sheet it will apply to the whole page.

pb&j
12-06-2003, 04:18 AM
Originally posted by hockyfan641
nope, if you put css in the body section of your style sheet it will apply to the whole page.
depending on the browser and version, sometimes it is a good idea to apply the styles to the TD as well. i think it was mostly N4 that needs this though and it is a dying breed.

jessi15
12-06-2003, 06:12 PM
Thanks for all the help, but I guess I'll work with the font that I've already got, build my page, and worry about the font later.

hockyfan641
12-06-2003, 07:07 PM
N4 doesn't read css does it? To hide css from N4 you can use @import

jessi15
12-06-2003, 07:31 PM
huh????? I'm using IE.

Rosey
12-06-2003, 08:01 PM
Netscape 4 should read css, i think that was the first too, although why anyone would still have netscape 4 is beyond me.

Netscape reads most of the css stuff but not the scrollbars.

hockyfan641
12-06-2003, 10:31 PM
ahh..that's right. Mozilla doesn't see custom scroll bars either. Neither does any mac browser.

jessi15
12-07-2003, 12:02 AM
About the actual topic of this post, I finally figured out how to get the fonts I wanted. All I had to do was take out the font-family part of my css and write it in on the html of the individual pages. I don't know why the css won't work for any of the font attributes though. I couldn't change the face, the size, or make it bold. Oh well, at least I finally figured it out.

hockyfan641
12-07-2003, 02:34 AM
if you put your text in a span tag you could just go like this

<span style="font: fontname; text-decoration: bold;">text</span>

jessi15
12-07-2003, 06:14 PM
Too complicated.

I just do this: <font face=arial color=red size=4>TEXT</font>

hockyfan641
12-07-2003, 06:26 PM
Yes, but that's deprecated. It's best to use css, and you can even create a new class in an external style sheet so all you would have to do is <span class="classname">text</span>

jessi15
12-07-2003, 07:06 PM
It may be, but I'm new to this and I don't want to get lost in something too complicated for the moment. Would it work to do it the way I am now and build my page, then change it later, or is there too big of a difference?

P.S. What is a span class anyway?

hockyfan641
12-07-2003, 07:07 PM
It works either way, it's recommended to use css though.

jessi15
12-07-2003, 07:10 PM
But would it be too hard to change it to css afterward? I want to learn more about css, but I don't have much time at the moment. I might have time around Christmas break though.

hockyfan641
12-07-2003, 07:15 PM
Nope, not at all. What you can do in your html editor is use the find feature. Which you can do by pressing ctrl+f or edit > find. Then just type in "font" and it will find your font tags. Then you can either
a) replace them with span tags or
b) create an external style sheet with the font for different classes and/or tags.

jessi15
12-07-2003, 07:21 PM
Does this work if I'm only using Notepad?

hockyfan641
12-07-2003, 07:23 PM
Yep, edit > find. There's other stuff that you'll probably want to replace with css also.

check out www.w3schools.com

jessi15
12-07-2003, 07:27 PM
Thank You!!!

hockyfan641
12-07-2003, 07:37 PM
No problem, any time. :)

jessi15
12-07-2003, 07:41 PM
Do you know any good books on HTML?

I went on amazon and HTML for the World Wide Web with XHTML and CSS: Visual QuickStart Guide seems like the best bet. It got 4.7/5 stars with 406 reviews.

And what is XHTML and DHTML and all that stuff?

hockyfan641
12-07-2003, 07:49 PM
XHTML is a stricter version of html. It closes tags that aren't normally closed. For example:
the img tag is not closed, like the table tag is(<table></table>). So what xhtml does is adds a slash at the end of the tag. Like this. <img src="image.jpg" alt="" />
It also does this with other tags like br and hr.
All of your tags must must be lower case. And you have to have an xhtml doctype.

DHTML is basically just javascript.

When you write xhtml it's best to validate the code at http://validator.w3.org

jessi15
12-07-2003, 08:00 PM
Oh, okay. Thanks again!