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

text size and basefont

Status
Not open for further replies.

MP498T

MIS
Mar 14, 2001
15
GB
I'm struggling with the <style> tag and setting a base font size. I understand that unless otherwise stated the default size is &quot;3&quot;. What I would like is to set the font size to be &quot;2&quot; (or -1?) throughout the whole page.

I can do it seperatly for <p> or <table> but is there a way of globally setting it to covers text in these and the rest? Currently I've got this -

Code:
<STYLE type=&quot;text/css&quot;>
basefont {font-size: 2;}
body {font-family: Verdana, &quot;Times New Roman&quot;;}
</STYLE>
I've also tried
Code:
body {font-family: Verdana, &quot;Times New Roman&quot;;
      font-size: 2;}
with no change.

Am I on the right lines or what am I missing?

regards
Jason.
 
font-size:2 will make you have a font size of 2 in pixels. It is not the same as <font size=2>. You should make sure you have px after it for pixels. You will be much better off with a font-size of between 10 and 12. Remember: add px right after the number in the style sheet, but not if its in the <font size=2> tag.

Mike
 
Hi Jason,

You can also add [bold]pt[/bold] instead of [bold]px[/bold]

font-size: 2;pt

Erik
 
Ooh, I made a mess of it and aperfectcircle submitted a fraction earlier with a good answer, but here is what i ment:

You can also add pt instead of px

font-size: 2pt;

Erik
 
I'm not sure you can even SEE a 2pt (or 2px) font without a magnifying glass, and even then all you'ld probably see are a few dots, not a recognizable letter. What's the difference in appearance of I and i when they're both only two pixels high?
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Oh my apologies too. I said px not pt. i should pay more attention next time. sorry for the confusion.

mike
 
Thank you all for your input. I found that setting the font-size to either px or pt didn't allow the users of Internet Explorer to then re-size the text themselves (using 'View/Text Size'), though Netscape users were able to change the size.

The solution was to set the font-size to a percentage
Code:
body {font: verdana;
      font-size: 105%;}

This did allow both IE and Netscape users to resize.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top