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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

seting font size in a page 2

Status
Not open for further replies.

dklovedoctor

Programmer
Oct 6, 2002
5
0
0
GR
hello eveyone
hope no war is on
and

is there any way to define the size of the font in the browser
through asp or vbscript

what is really burdens me is that the
<body><font size=2> ... </font></body> section
does not affect tables
so, everything except the tables have font size of 2
and the tables have font size of 3

thanx alot!!!
 
Try something like that :
Code:
<Body style=&quot;FONT-SIZE: 3em&quot;>...</Body>

Note you can change the &quot;em&quot; unit by &quot;px&quot;, &quot;pt&quot;, &quot;cm&quot;, ... Water is not bad as long as it stays out human body ;-)
 
This question should be asked in the HTML and CSS Forum.

It is an issue of CSS inheritance and nothing VBScript can help you with.

Consider:
Code:
<html>
  <head>
    <style>
      body {font: bold 9pt Arial; color: red}
    </style>
  </head>
  <body>
    <p>This is some text.</p>
    <table>
      <tr><td>Test 00</td><td>Test 01</td><td>Test 02</td></tr>
      <tr><td>Test 10</td><td>Test 11</td><td>Test 12</td></tr>
      <tr><td>Test 20</td><td>Test 21</td><td>Test 22</td></tr>
    </table>
    This text isn't even in a paragraph.
  </body>
</html>
If you copy this into a file and view it in IE (I'm using IE6) you will see that the two strings of text both inherit the foreground color, and the font-family, and the font-weight, and the font-size.

But the text in the table cells inherits only the foreground color and the font-family.

The rules are complex and I haven't found a reference that gives them in any concise and sensible form either.

I suggest that you set up styles for <body>, <p>, and <table> and give them all the same attributes for best results - since it seems you want them uniform. You may still find surprises. ;-)
 
I didn't realize because I surf in both these forums but dilettante is right, you should have post in &quot;HTML and CSS&quot;. Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top