• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

controlling font size

I am creating web pages. I use arial font size 10 and arial narrow font size 18. My display properties settings font size is small fonts. Now i can view the page properly. But if i change the display properites settings font size to large font, it does not display
what i exactly want the font size on the page (it display big size and trancates the sentance to the second line. So what I want is how to solve this problem.
0
pandian
Asked:
pandian
1 Solution
 
MorFFCommented:
You can't stop the user from changing between large&small fonts.

The only way to force the size exactly is to create the text as part of a graphic.  This of course has the drawback that it adds to download time.

Cheers - MorFF
0
 
tucan1Commented:
<CENTER><font size =5<P> NEW....HAMFEST 1999 </CENTER></font></P>


try this you can change the 5 to what ever but it will take longer to load but i dont worry about that much
go visit my web page and see if it gives you any ideas...to veiw my html just right click in a blank space and select veiw sorce.

http://www.geocities.com/Heartland/Flats/7292/

0
 
jelloCommented:
have you tried using style sheets to force the font to a specific point or pixel size?

One warning -- if you're new to CSS, Netscape and IE do not always process them the same way, so a little creative juggling is sometimes necessary to get your page to look the same in all browsers.

Let me know if you'd like me to post some code to show you how to do this.

-jello
0
 
pandianAuthor Commented:
yes, please jello.
thank you.
0
 
jelloCommented:
Here's the code we talked about.....

<HTML>
<HEAD>

<STYLE TYPE="text/css">
 <!--
  .general  {
       font-size : 10px;
      font-family : Arial;
 }
..header  {
       font-size : 18px;
      font-family : Arial Narrow;
 }
 -->
 </STYLE>
</HEAD>

<BODY>

<DIV CLASS="header">blah blah blah</DIV>
<DIV CLASS="general">blah blah blah</DIV>
</BODY>
</HTML>

----------------------------------------

It's pretty self-explanatory.  There are 2 style groups - header and general.  (You can name them anything nyou want.)  each style is invoked by calling the class in a DIV tag.  In addition to size and font family, you can control margins, borders, style (italic and oblique), weight (bold, light, etc...), alignment, colors, and more.  There are many good CSS resources online that will give you a complete rundown.

I mentioned IE vs. Netscape earlier.  They differ in where they start their margins, and how they interpret point size in fonts.  Ususally, the differences are subtle enough that you can find a happy medium, and no one will notice.

As for the proposed answer to your question, I would avoid making text into a graphic wherever you can.  The only exception might be if you're making a headline style banner in a decorative font that your user might not have on his machine.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now