?
Solved

Deny Text Size Changes

Posted on 2003-02-25
11
Medium Priority
?
123 Views
Last Modified: 2010-05-18
How would I go about making it so that even if the text size is set to to anything other than 100%/medium in their browser, it'll still show as medium? So basically I would always like to show the text size as 100%, nothing else.
0
Comment
Question by:blizzdek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 17

Accepted Solution

by:
dorward earned 140 total points
ID: 8020084
Short answer: You can't.

Slightly longer answer:

In IE _only_ (unless the user overrides it in their user style sheet) you can define a font size using px or pt as the units in a style sheet for the font-size property. However this is a VERY bad idea:

* http://style.cleverchimp.com/font_size/points/font_wars.GIF
* http://diveintoaccessibility.org/day_26_using_relative_font_sizes.html

The REAL problem is probably not that the user can resize the font, but that the design doesn't work if the user does so. The solution is to fix the design so it doesn't matter. (Using em or ex as the unit for EVERYTHING helps here).
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8020357
The closest you will come to controlling font size is to do all blocks of text as graphics.  if your design is critically dependent on the font size it will fail in some cases no matter what else you do.  

There is also the accessibility issue.  By trying to control the font size you are basically putting up a sign that says "visually impaired not welcome".

My advice is that you look to developing a more elastic design that does not require this kind of rigid approach that will only look on the computer you develop it on.

Cd&
0
 
LVL 4

Expert Comment

by:hanneman
ID: 8025033
<font style="font-size:12pt">I am 12pt text</font>

this will keep text as 12pt even if user changes text size settings in their browser.

not recommended though for reasons Cd has already covered.

-h
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 17

Expert Comment

by:dorward
ID: 8025158
As I said in my initial post - setting the font size in "pt" locks the font size only in Internet Explorer and only without an overriding user style sheet.
0
 
LVL 4

Expert Comment

by:hanneman
ID: 8025242
yeah, i thought i would just give a very basic example. as i thought that if blizzdek didnt know how to fix a font size, they also might not know about stylesheets.
0
 

Expert Comment

by:stebesplace
ID: 8035926
Don't waste your time. Let people control what they want. The defacto is medium, so that is what comes shipped as and installed as. if they want to change it, let them, otherwise keep your regular conventions.

-Steve
0
 

Expert Comment

by:kishannarasiah
ID: 8172229
its as simple as this.
create one css file
and in that add a class

for ex.
.txt{font-size:10px;}

link the css file to the mail HTML file
so even when the user uses the browser textsize the text size will be the same as you have given in the css file.

goodluck
0
 
LVL 17

Expert Comment

by:dorward
ID: 8172249
Yes yes, we know all about using px to set the font size. Its been discussed already in this thread, and its been pointed out that it doesn't work consistantly accross browsers, and that its overridable even in MSIE.

... but who mentioned "mail"?
0
 
LVL 17

Expert Comment

by:dorward
ID: 8172251
Ohh... a typo for "main"
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8820452
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 9011952
It is time to clean this abandoned question up.

I am putting it on a clean up list for CS.

<recommendation>
points to dorward -- grade A

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&

0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question