Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

very simple font question

Status
Not open for further replies.

786snow

Programmer
Nov 12, 2006
75

Hi,

In the code below, when i put the font to arial, i do not see any difference, i mean if I have it arial or if I do not have any style tags it does not make any difference the way text look. Am I doing something wrong here.


<html>
<head>
<style>

td {font-family:arial}
</style>
</head>

<table>
<tr><td>John</td></tr>
<tr><td><p>Pong</p></td></tr>
</table>
</html>
 
In its very basic form, this could work. The fact that you're not specifying the type of style tag, the fact that you do not use a doctype or provide a generic font name, or that you do not use a body tag probably should not hinder the display. The question is, what is not happening? Do you have Arial font in the table to begin with? Or is your font something else? If first and this is just an example, chances are font is defined elsewhere. If second, you might have a setting in your browser that ignores the fonts.
 
It works for me in IE6 (using a proper document type and having my style defined like this):
Code:
<style type="text/css">
<!--
td {font-family:arial}
-->
</style>

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
No I do not have font defined anywhere else. If I put someother font like

td {font-family:Times New Roman; font-size:12px}

I see the text style changes, but not with Arial....... May be my browswer default is already "Arial" but I tried in front page as well, there to I get the same results....
 
May be my browswer default is already "Arial" ...
That's what it sounds like.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top