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

Font Size/Browser settings

Status
Not open for further replies.

gwillr

IS-IT--Management
Nov 4, 2003
267
CA
I am trying to have a page override the browser's "view > Text Size" settings. What coding can be applied to the text to give this effect?

[I know that forcing the user's settings is not best practice, but this is a special case]

Gary
 
Hi Gary,

You can use css to specify a fixed font size:

body {font-size: 12px}

Of course, it's dependent on the user having whatever font you specify installed on their system.

 
AFAIK this can't be done in standards browsers - mozilla, opera, etc. They all scale fonts specified in pixels, points, and any other measurement I've seen. Perhaps some scripty widget would do it.
This'll certainly work in IE though.

If I may ask, what's the special case you're referring to? It may be there's another way of doing what you'd like to do, without taking away the option of adjustable text-size.

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
Thanks for the speedy replies tnsbuff and manarth. The special case is simply an intranet site for a few select people here at the office. Since this is the case, it would be easy just to have them set their browsers to the default "normal" text size setting, however, I am a bit of a 'stickler' and want get this right anyway :) as the application may come in handy for other projects.

The thing of it is, the site uses tables for its layout, and when the text size is increased, the tables go all 'willy-nilly' and the look of the page falls apart.

I currently am not using a CSS for this page, but could probably incorporate one easily enough if there are no other ways.

The other solution I had thought about is using images for all of the text that will pose a problem, but I am hoping that there will be a better way.

I appreciate any suggestions.

Gary
 
Here is a table that has the feature i am looking to incorporate, that is, font size stays the same no matter what browser setting the user has.

The problem is, I am not sure what gives the text here this property?

Code:
<body>

    <table border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
      <tr>
        <td colspan="3">
        &nbsp;</td>
      </tr>
      <tr>
        <td>
        <img src="xxxxxxxxxxxxxxxxxxxxxxxx" align="top" width="13" height="418"></td>
        <td width="430" height="418" background="xxxxxxxxxxx">
        <center>
        <table border="0" width="100%" style="border-collapse: collapse" bordercolor="#111111">
          <tr>
            <td align="center"><font color="#282484">
            <a onClick="reOpen=0" style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxxxxxxxxxxx"><br>
            <font color="#282484">January 25, 2003</font></a></font></td>
            <td align="center" valign="bottom">
            <font color="#282484"><br>
            <a style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxxxxxxxxxx"><font color="#282484">March 22, 2003</font></a></font></td>
            <td align="center"><font color="#282484">
            <br>
            </font>
            <a style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxx"><font color="#282484">June 21, 
            2003</font></a></td>
          </tr>
          <tr>
            <td align="center"><font color="#282484"><br>
            </font>
            <a style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxxxxxxxx"><font color="#<body>

    <table border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
      <tr>
        <td colspan="3">
        &nbsp;</td>
      </tr>
      <tr>
        <td>
        <img src="xxxxxxxxxxxxxxxxxxxxxxxx" align="top" width="13" height="418"></td>
        <td width="430" height="418" background="xxxxxxxxxxx">
        <center>
        <table border="0" width="100%" style="border-collapse: collapse" bordercolor="#111111">
          <tr>
            <td align="center"><font color="#282484">
            <a onClick="reOpen=0" style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxxxxxxxxxxx"><br>
            <font color="#282484">January 25, 2003</font></a></font></td>
            <td align="center" valign="bottom">
            <font color="#282484"><br>
            <a style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxxxxxxxxxx"><font color="#282484">March 22, 2003</font></a></font></td>
            <td align="center"><font color="#282484">
            <br>
            </font>
            <a style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxx"><font color="#282484">June 21, 
            2003</font></a></td>
          </tr>
          <tr>
            <td align="center"><font color="#282484"><br>
            </font>
            <a style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxxxxxxxx"><font color="#FFFF99">&nbsp;December 
            20, 2003</font></a></td>
            <td align="center"><font color="#FFFF99"><br>
            </font>
            <a style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxxxxxxxxxxx"><font color="#282484">October 
            20, 2002</font></a></td>
            <td align="center"><font color="#282484"><br>
            <a style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxxxxxxx"><font color="#282484">July 12, 2003</font></a></font></td>
          </tr>
        </table>
        </center></td>
        <td>
        <img src="xxxxxxxxxxxxxxxxxxxxxxx" align="top" width="17" height="418">
        </td>
      </tr>
      <tr>
        <td colspan="3">
        <img src="xxxxxxxxxxxxxxxxxxx" width="460" height="18"> </td>
      </tr>
    </table>
    
</body>">&nbsp;December 
            20, 2003</font></a></td>
            <td align="center"><font color="#FFFF99"><br>
            </font>
            <a style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxxxxxxxxxxx"><font color="#282484">October 
            20, 2002</font></a></td>
            <td align="center"><font color="#282484"><br>
            <a style="font-size: 12px; font-family: Verdana,Arial; text-decoration: none; color: black; font-weight: bold" href="xxxxxxxxxxxxxxx"><font color="#282484">July 12, 2003</font></a></font></td>
          </tr>
        </table>
        </center></td>
        <td>
        <img src="xxxxxxxxxxxxxxxxxxxxxxx" align="top" width="17" height="418">
        </td>
      </tr>
      <tr>
        <td colspan="3">
        <img src="xxxxxxxxxxxxxxxxxxx" width="460" height="18"> </td>
      </tr>
    </table>
    
</body>

Gary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top