SitePoint Sponsor |
|
User Tag List
Results 1 to 13 of 13
-
Jan 3, 2001, 13:00 #1
- Join Date
- Aug 2000
- Posts
- 9
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Is there a way to override the browser font size settings with javascript. Basically we want to set the text size on a page so that if someone has their browser font setting say to "large" it does not take effect.
-
Jan 3, 2001, 17:41 #2
- Join Date
- Nov 2000
- Location
- A home in the hills where the grass grows green an
- Posts
- 183
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You dont need javascript to accomplish this, just use absolute sizes for your text. Instead of "font-size: 1" use "font-size 8pt" or "font-size 8px"
-
Jan 3, 2001, 17:58 #3
- Join Date
- Aug 2000
- Posts
- 9
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thank you for your response. Dictating a point size is only good in Netscape is it not?? I have found a solution not by using javascript but by using a CSS and it is working just as we wanted.
-
Jan 3, 2001, 18:01 #4
- Join Date
- Jul 1999
- Location
- Chicago
- Posts
- 2,629
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by kellyg
Dictating a point size is only good in Netscape is it not?
Note: Why would you want to go against your visitors' wishes? It doesn't make sense to make choices for them. I set my font size large for easier reading and when I go to these "next-generation" sites with 8pt type it really makes me mad. Just my $1. Keep the change
-
Jan 3, 2001, 18:14 #5
- Join Date
- Aug 2000
- Posts
- 9
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
because i have an image sliced to look like a story book and the images are in tables cells...to have bigger text, blows the table apart...thanks though
-
Jan 6, 2001, 10:40 #6
- Join Date
- Dec 2000
- Location
- Belgium
- Posts
- 132
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If you want real absolute sizes, you should go for pixels (px), not for points. Points are still relative to the browser settings.
</jppr>
-
Jan 6, 2001, 14:34 #7
- Join Date
- Mar 2000
- Location
- Muskegon, MI
- Posts
- 2,328
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You may want to search this form, this topic has come up before.
Basically, if someone sits a specfic font size in their browser or through the OS, you can not resize it with CSS or JavaScript. And there is good reason for this.
Most folks who intentionally reset their font sizes do so because of poor eyesight. If you try to override this (you can't) then your defeating the purpose because they won't be able to read your site anyway.
-
Jan 6, 2001, 14:46 #8
- Join Date
- Dec 2000
- Location
- Belgium
- Posts
- 132
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
well you're wrong there westmich. Try going to any article on SP, click on "Print this article" and than change font size to biggest in View (in IE4 for example).
You'll see that nothing changes, except for the code.
Just by using pixels.
</thomas>
-
Jan 6, 2001, 23:00 #9
- Join Date
- Mar 2000
- Location
- Muskegon, MI
- Posts
- 2,328
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I stand corrected
-
Jan 7, 2001, 08:23 #10
- Join Date
- Dec 2000
- Location
- Belgium
- Posts
- 132
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What exactly do you mean with "I stand corrected".
(My mother language != English)
Does it mean
"You're right, I was wrong"
or
"I keep with my point of view, you're wrong"
??
Thx
</jppr>
-
Jan 7, 2001, 10:24 #11
- Join Date
- Jul 2000
- Posts
- 759
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It means that he knows that he was wrong and that you were right
-
Jan 7, 2001, 11:17 #12
- Join Date
- Dec 2000
- Location
- Belgium
- Posts
- 132
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Ok, thanks mkaufman.
So it is possible, but westmich has a point here:
Most folks who intentionally reset their font sizes do so because of poor eyesight. If you try to override this then your defeating the purpose because they won't be able to read your site anyway.
But, if your site is made for people of, let's say, 45 and older, don't use tiny font sizes. Adapt them.
For those of you that want an overview of how different browsers display fonts etc., visit
http://hotwired.lycos.com/webmonkey/...html?tw=design
Cheers
-
Jan 7, 2001, 13:07 #13
- Join Date
- Mar 2000
- Location
- Muskegon, MI
- Posts
- 2,328
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by mkaufman
It means that he knows that he was wrong and that you were right
Bookmarks