This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > April 2004 > varible font size w/ CSS





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author varible font size w/ CSS
mgorinstein

2004-04-23, 4:30 am

Is it possible?

All my stuff is now CSS, all but font size that I still use <font size="2">
for all text.
I do so that people can change the size of the font w/ their browser.

how can I still do this w/ CSS?

I've seen many professional pages that won't let users change font size and
that sucks and I've also seeing
pages that give users 3 links choices for font size so that if you click on
it, the pages CSS is changed.

But as I said I don't want that. I want to define font size with CSS but still
let it be changeable by the users browser setting.

thank you

Osgood

2004-04-23, 7:28 am

mgorinstein wrote:

> Is it possible?
>
> All my stuff is now CSS, all but font size that I still use <font size="2">
> for all text.
> I do so that people can change the size of the font w/ their browser.
>
> how can I still do this w/ CSS?
>
> I've seen many professional pages that won't let users change font size and
> that sucks and I've also seeing
> pages that give users 3 links choices for font size so that if you click on
> it, the pages CSS is changed.
>
> But as I said I don't want that. I want to define font size with CSS but still
> let it be changeable by the users browser setting.
>
> thank you
>

You can change the size of the text in any modern browser, even IE 5.
Other browers make it even simpler to enlarge the text. No css can stop
this.

Instead of specifying your css text in pixels you can also use % which
will scale the text according to what size the end user has there text
set at.

Be aware that if you use the % method you have to handle it corrcetly.
For instance if you tell a table, nested within another table, or a
<div> inside another <div> to render the text at 80% and the parent
table or <div> is already rendering text at 80% then the nested
container text will be 80% of 80%, not the full 80%.

Personally I would just stick with pixels. Anyone who is visually
challenged will almost certainly know how to enlarge the text via their
browser, its so easy.

Gary White

2004-04-23, 9:28 am

On Fri, 23 Apr 2004 07:06:22 +0000 (UTC), "mgorinstein"
<webforumsuser@macromedia.com> wrote:

> All my stuff is now CSS, all but font size that I still use <font size="2">
>for all text.
> I do so that people can change the size of the font w/ their browser.
>
> how can I still do this w/ CSS?



The easiest to use is to use the absolute sizes, xx-large down to
xx-small for sizing your text.


Gary
Michael Fesser

2004-04-23, 9:29 am

.oO(mgorinstein)

> All my stuff is now CSS, all but font size that I still use <font size="2">
>for all text.
> I do so that people can change the size of the font w/ their browser.
>
> how can I still do this w/ CSS?


Use % or em for the text. Specify the font-family and the default
font-size (should be 90-100%, not less) for the body element. That's it.
If you need smaller texts somewhere (a footer for example) simply add a

font-size: 80%

or sth like that to the element.

> I've seen many professional pages that won't let users change font size


I don't consider them professional.

Micha
Murray *TMM*

2004-04-23, 5:29 pm

Or use pixels. It's OK. Really.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Michael Fesser" <netizen@gmx.net> wrote in message
news:t72i80lklkosp6tdj662b7l6vq57noahhc@4ax.com...
> .oO(mgorinstein)
>
size="2">[color=darkred]
>
> Use % or em for the text. Specify the font-family and the default
> font-size (should be 90-100%, not less) for the body element. That's it.
> If you need smaller texts somewhere (a footer for example) simply add a
>
> font-size: 80%
>
> or sth like that to the element.
>
>
> I don't consider them professional.
>
> Micha



raizel

2004-04-23, 5:31 pm

In article <c6af9e$aov$1@forums.macromedia.com>,
"mgorinstein" <webforumsuser@macromedia.com> wrote:

> Is it possible?
>
> All my stuff is now CSS, all but font size that I still use <font size="2">
> for all text.
> I do so that people can change the size of the font w/ their browser.
>
> how can I still do this w/ CSS?
>
> I've seen many professional pages that won't let users change font size and
> that sucks and I've also seeing
> pages that give users 3 links choices for font size so that if you click on
> it, the pages CSS is changed.
>
> But as I said I don't want that. I want to define font size with CSS but
> still
> let it be changeable by the users browser setting.
>
> thank you


But using <FONT SIZE="2"> means by _default_ you're declaring a small
font for many, many viewers. There are many ways to declare CSS font
sizes. I know I use pixels and can adjust size w/o problem. I could do
this even when I used IE (I don't touch it anymore).

--
raizel
remove the STARS from your eyes to reply
mgorinstein

2004-04-24, 4:29 am

First I wold like to thank you all for the posts.

Now to business
<font size="2"> has been my way to define font size since ever but now it
doesn't work for me since I've taken two sites to manage adding to my other one
that has more than tripled in size, so CSS is the way to go since it'll save my
tons of time.

I've read all of the posts and I feel I should clarify somethings and answer
others.

1- IE is by far the most used browser (it's maybe used by over 90% of users)
so when I build my sites my target browser is IE5 and the target resolution is
800x600.

It doesn't mean that Netscape users and Opera users (all 47 of them :) ) are
left w/ a crummy site.
I do my best w/ "if" and "else" on jscripts and <noscript> tags but their is a
limit since we should keep in mind the poor dial-up souls.

I do not go as far as redirecting users to crude site versions made for the
special delight of those 356 die hard users of IE1, IE2, NS1 and NS2.

2- the use of pixels for font size is not out of the question.

I think it can be used if somehow by code (CSS or javascript) we can define
the font size in pixel for the 5 IE pre-defined sizes.
smallest - smaller - medium - larger - largest.

If by code we define those to be for example:

smallest 8px - smaller 10px - medium 12px - larger 14px - largest 16px

it would work out and make my happy and achieve world peace!!!

Can it be done?

Thank you

mgorinstein

mgorinstein

2004-04-24, 5:29 pm

bump
Gary White

2004-04-24, 5:29 pm

"mgorinstein" <webforumsuser@macromedia.com> wrote in message
news:c6ds69$j2p$1@forums.macromedia.com...
> bump


Bump what? I'm not sure what you're asking. Here is what you wrote:

>If by code we define those to be for example:
>
>smallest 8px - smaller 10px - medium 12px - larger 14px - largest 16px
>
>it would work out and make my happy and achieve world peace!!!
>
>Can it be done?



If you're asking if you can specify what size each of the browser sizes will
be, the answer is no. All you can specify is the size that will be used for
Medium. For the IE/Windows user, if you specify that size using either
pixels or points, then the user cannot resize your text using the menu
options unless they go into their accessibility preferences and tell the
browser to ignore your text sizes completely. That means that the browser
will completely ignore ALL the sizes you specify. If you size the text using
any of the other options for units of measure, the user can resize the text
using the normal menu options in IE and the browser will size the text for
the larger and smaller options based on a percentage of the size you
specify.

Gary


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews