Changing font in a table

windows

Guest
Arghh!! A stupid question! =P<br />
<br />
Basically, most of the content of my page is in a table, and I want the font in every cell of every table on the page (in fact, all the font on the page) to be a specific style (namely Gautami, size 2) The problem is, if I just stick <font face="Gautami" size="2"> at the top of my page, then get stuck in with my table, the font in the table goes back to the default (Times New Roman! argh! =P )<br />
<br />
I can stick the font thing in every cell, but that seems kinda time-consuming and difficult...is there a straigh-forward way?<br />
<br />
Cheers-<br />
Wozza<!--content-->1) From the HTML 4.01 Specification:<br />
Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables.<br />
<!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/struct/tables.html#h-11.1">http://www.w3.org/TR/html4/struct/tables.html#h-11.1</a><!-- m --><br />
2) <br />
<br />
<style type="text/css"><br />
<!-- <br />
td, th {font-family:Gautami, 'Lucida Sans Unicode', sans-serif}<br />
--><br />
</style><!--content-->Right...<br />
<br />
I'm sure your intentions are good, and thanks for the reply, but it's not what you'd call useful to me, as such...<br />
<br />
I've no idea what to do with the code you've posted (the obvious answer may prove...well...counterproductive). I have no working knowledge of style sheets, and I don't know whether or not the quote you posted implies that it's impossible to change font over an entire table with one command.<br />
<br />
so...<br />
<br />
Cheers.<!--content-->Number 1 above is an admonition. It if applies then take it to heart. If you cut and paste number 2 above into your document's HEAD element then you will find that for every TD and TH element on the page it sets the font to 'Gautami' and if it cannot find that then it uses 'Lucida Sans Unicode' and if not that then it uses the defauls sans-serif font.<br />
<br />
Learn CSS (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/">http://www.w3.org/TR/REC-CSS2/</a><!-- m -->)and HTML 4.01 (<!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/">http://www.w3.org/TR/html4/</a><!-- m -->). The FONT element was depricated back in 1997.<!--content-->Once again, thanks. The code makes sense, and I am reading the first CSS tutorial as I type (well, not as I type, obviously, but it's down there on the toolbar). However, the code doesn't seem to work... No doubt I'm doing something wrong, but pasting it into the head section of the page has no apparent effect...<br />
<br />
Sick of me yet? Yeah, me too =P<br />
<br />
Cheers once again-<br />
Wozza<!--content-->Then post the URL so we can see what's going on.<!--content-->www.geocities.com/ne_peut_pas/index.html (<!-- m --><a class="postlink" href="http://www.geocities.com/ne_peut_pas/index.html">http://www.geocities.com/ne_peut_pas/index.html</a><!-- m -->)<br />
<br />
Ah. A moment, while I upload...<br />
<br />
Ah, ffs. One moment more...<br />
<br />
Right. Now it's sorted. How do the proffesionals not go crazy? Is it just copious amounts of weed? Or are the crazy to start with?<br />
<br />
Cheers, once and possibly for all (but who really believes that?)<br />
-Wozza<!--content-->1) That's not your working page. I don't see where you have attempted to use my example and as such I cannot see where you have done wrong in the attempt.<br />
<br />
2) When I past my example into your page it works fine.<br />
<br />
3) You have not taken to heart my number 1 admonition.<br />
<br />
4) Before you try learning CSS you need to learn HTML. CSS will not work without well formed HTML.<!--content-->Originally posted by Charles <br />
...If you cut and paste number 2 above into your document's HEAD element then you will find that for every TD and TH element on the page it sets the font to 'Gautami' and if it cannot find that then it uses 'Lucida Sans Unicode' and if not that then it uses the defauls sans-serif font.<br />
<br />
<br />
From <!-- m --><a class="postlink" href="http://www.geocities.com/ne_peut_pas/index.html">http://www.geocities.com/ne_peut_pas/index.html</a><!-- m --><br />
<html><br />
<head><br />
<style type="text/css"> <br />
<!-- <br />
td, th {font-family:Gautami, 'Lucida Sans Unicode', sans-serif} <br />
--> <br />
</style><br />
</head><br />
<body> <br />
After which follows a simple table, containing some text...<!--content-->Ah, now I've got a copy of your working page and it's working just fine for me. Are you sure that you have the Gautami font installed? Try changing 'Gautami' to 'Symbol'.<!--content-->Yike! I now have craziness...so I guess it's working. That's kinda weird, because when I set some text to Gautami the old way (with font="whatever") it shows...well...something. Maybe not Gautami. Maybe...maybe...maybe I should take up drinking. =P<br />
<br />
Many thanks for your patience. I think I'd better go read up on a whole load of stuff, now.<br />
<br />
*grin* I'm still buggered if I know why I can't get the Gautami, but apparently it's not a problem with the code.<br />
<br />
Cheers, once and for all (or at least an hour or so)<br />
-Wozza<!--content-->Now try it with td, th {font-family:Gautami, Symbol, sans-serif}. If you still get Greek letters then you do not have "Gautami" properly installed.<!--content-->Gods...<br />
<br />
With td, th {font-family:Gautami, Symbol, sans-serif}, I get a default font of some kind. It's not the Symbol, and it's not Gautami. Er...I'll put it up now...<br />
<br />
Ok... So, when I set the font with the old font command, I see Gautami. When I do it with the css, no such luck but when I set the font to Symbol with the css, it works, and I think my brain is bleeding. =P<!--content-->I don't have Gautami installed so where you have employed the long ago depricated FONT element I see my default font-family Georgia and in the table I see Greek letters. <br />
<br />
I still think that you haven't properly installed Gautami.<!--content-->Yeah, you're probably right. Not to worry, I'll find me a font somewhere. Many, many thanks for your help.<!--content-->
 
Back
Top