By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,246 Members | 1,401 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,246 IT Pros & Developers. It's quick & easy.

Relative or absolute font size?

P: n/a
Should I use <font size=-2> or <font size=1>?? They seem to give the same
results...

I wish to be able to set the default font family and font size for a website
and STILL SUPPORT _fluid_texts_.

--
Erik Andersson ( AussieTraders.com.au )
http://www.aussietraders.com.au/
- Placing an add is FREE at AussieTraders.com.au, Australia's buy & sell
marketplace
Jul 20 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
On Wed, 18 Feb 2004 12:57:23 +1000, AussieTraders.com.au
<bo****@aussietraders.com.au> wrote:
Should I use <font size=-2> or <font size=1>?? They seem to give the same
results...
Relative, because the effect is identical only when you're default is 3.
If you need a larger size, 1 is going to be impossible. Be aware that
setting font sizes in the HTML is deprecated in the most recent
recommendations.
I wish to be able to set the default font family and font size for a
website
and STILL SUPPORT _fluid_texts_.


An external CSS will do you wonders. Check out http://www.htmldog.com for
a good beginning to CSS.

Still, you are subject to the realities of the web - the user may not have
the font you wish to designate, so have fallbacks and make the page look
good on the fallbacks. And allow the user to resixe text to make it
readable, use ems for font-size rather than a fixed measurement. You may
*suggest* a font family and size, but it may not be what is possible or
even desirable on some people's computers.
Jul 20 '05 #2

P: n/a
Quoth the raven named AussieTraders.com.au:
Should I use <font size=-2> or <font size=1>?? They seem to give
the same results...
Neither. Move the presentation to CSS.
I wish to be able to set the default font family and font size for
a website and STILL SUPPORT _fluid_texts_.


body {
font-family: Arial, Helvetica, sans-serif;
font-size: 100%;
}

--
-bts
-This space intentionally left blank.
Jul 20 '05 #3

P: n/a
Does that mean I should never use the <font> tag and whenever I need a
smaller or bigger font than the default use something like:

<div style="font-size: 150%">Lorem ipsum dolor sit amet</div>

Or can you suggest something better?

--
Erik Andersson ( AussieTraders.com.au )
http://www.aussietraders.com.au/
- Placing an add is FREE at AussieTraders.com.au, Australia's buy & sell
marketplace

"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in message
news:jk*******************@twister.nyroc.rr.com...
Quoth the raven named AussieTraders.com.au:
Should I use <font size=-2> or <font size=1>?? They seem to give
the same results...


Neither. Move the presentation to CSS.
I wish to be able to set the default font family and font size for
a website and STILL SUPPORT _fluid_texts_.


body {
font-family: Arial, Helvetica, sans-serif;
font-size: 100%;
}

--
-bts
-This space intentionally left blank.

Jul 20 '05 #4

P: n/a
Is there anything wrong with using % instead of ems? % seems to have a
better effect when resizing.

--
Erik Andersson ( AussieTraders.com.au )
http://www.aussietraders.com.au/
- Placing an add is FREE at AussieTraders.com.au, Australia's buy & sell
marketplace
"Neal" <ne*****@spamrcn.com> wrote in message
news:op**************@news.rcn.com...
On Wed, 18 Feb 2004 12:57:23 +1000, AussieTraders.com.au
<bo****@aussietraders.com.au> wrote:
Should I use <font size=-2> or <font size=1>?? They seem to give the same results...


Relative, because the effect is identical only when you're default is 3.
If you need a larger size, 1 is going to be impossible. Be aware that
setting font sizes in the HTML is deprecated in the most recent
recommendations.
I wish to be able to set the default font family and font size for a
website
and STILL SUPPORT _fluid_texts_.


An external CSS will do you wonders. Check out http://www.htmldog.com for
a good beginning to CSS.

Still, you are subject to the realities of the web - the user may not have
the font you wish to designate, so have fallbacks and make the page look
good on the fallbacks. And allow the user to resixe text to make it
readable, use ems for font-size rather than a fixed measurement. You may
*suggest* a font family and size, but it may not be what is possible or
even desirable on some people's computers.

Jul 20 '05 #5

P: n/a
"AussieTraders.com.au" <bo****@aussietraders.com.au> wrote in
news:40330a22$0$813$61c65585@uq-127creek-reader-
01.brisbane.pipenetworks.com.au:
Does that mean I should never use the <font> tag and whenever I need a
smaller or bigger font than the default use something like:

<div style="font-size: 150%">Lorem ipsum dolor sit amet</div>

Or can you suggest something better?


You're better off using styles to set font sizes, yes, but to really get
the full benefits of styles you should be setting them in a style sheet
rather than inline with your markup. Ideally you'd give your <div> an id
(if it plays a fixed role on the page, such as a main menu) or a class (if
it's one of potentially several sections of a page that serve a particular
purpose, such as a product listing) and then specify all the styling
information for that type of section in one place in a stylesheet that's
common to all or most of the pages in your site.

When you do that, you greatly unclutter your markup (which can result in
much smaller pages and less bandwidth usage) and you gain the ability to
make changes to your site's "look and feel" *very* easily, because you just
have to change one stylesheet rather than every individual page. And that
in turn makes such changes so painless that you'll find yourself
experimenting with making small changes in your look and feel, and if you
do those experiments properly, you can wind up with quite substantial
improvements.

Using stylesheets lets you move from creating sites where the content looks
like it was forced into the layout to creating sites where the layout looks
like it was tailor-made for the content. And that's because you're not
forced to cast the layout in stone before the content has been created. At
least you're not forced by the technology; if business arrangements require
the client to sign off on the layout (done as a "comp") at the very
beginning of the project, you're still going to be pushed toward what
Christopher Schmitt calls "Twinkie sites" (i.e. the "filling" (content)
looks like it was injected into the "shell" (layout)), but at least you've
now got the possibility of changing those arrangements.
Jul 20 '05 #6

P: n/a
On Wed, 18 Feb 2004, AussieTraders.com.au wrote:
<div style="font-size: 150%">Lorem ipsum dolor sit amet</div>

Or can you suggest something better?


<big style="font-size: 150%">Lorem ipsum dolor sit amet</big>

--
Top-posting.
What's the most irritating thing on Usenet?

Jul 20 '05 #7

P: n/a
AussieTraders.com.au <bo****@aussietraders.com.au> wrote:
Does that mean I should never use the <font> tag
Yes.
and whenever I need a smaller or bigger font than the default use
something like:

<div style="font-size: 150%">Lorem ipsum dolor sit amet</div>

Or can you suggest something better?


Better would be to use markup that conveys the meaning of the content, for
example:

<h3>Lorem ipsum dolor sit amet</h3>

Or at the very least:

<div class="brillig">Lorem ipsum dolor sit amet</div>

Then use a separate style sheet to style it:

h3 { font-size: 150% }
div.brillig { font-size: 150% }
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"I used to do lots of dumb things, but I turned my life around 360 degrees!"
Jul 20 '05 #8

P: n/a
How am I supposed to post my replies in a newsgroup?:
http://allmyfaqs.com/faq.pl?How_to_post

AussieTraders.com.au wrote:
Is there anything wrong with using % instead of ems?


No. In fact, you will avoid an MSIE bug, and some think it's a better
way in any case.

body {font-size: 100%;}

h1 {font-size: 190%;}

/* etc. */

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #9

P: n/a
Cheers mate, % is the go!

All the best,

--
Erik Andersson ( AussieTraders.com.au )
http://www.aussietraders.com.au/
- Placing an add is FREE at AussieTraders.com.au, Australia's buy & sell
marketplace

"Brian" <us*****@julietremblay.com.invalid-remove-this-part> wrote in
message news:umSYb.73142$uV3.527728@attbi_s51...
How am I supposed to post my replies in a newsgroup?:
http://allmyfaqs.com/faq.pl?How_to_post

AussieTraders.com.au wrote:
Is there anything wrong with using % instead of ems?


No. In fact, you will avoid an MSIE bug, and some think it's a better
way in any case.

body {font-size: 100%;}

h1 {font-size: 190%;}

/* etc. */

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #10

P: n/a
It seems "AussieTraders.com.au" wrote in
comp.infosystems.www.authoring.html:
Should I use <font size=-2> or <font size=1>??


No.
Okay, that was facile. You should not use <font size> because
different browser interpret it differently. If you want bigger text
use <big> ... </big> and if you want smaller text use <small> ...
</small>.

But both of those should be for relatively short stretches of text,
not for the whole document and certainly not for headings (use <h1>,
<h2>, etc.).

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #11

P: n/a
AussieTraders.com.au wrote:
Cheers mate, % is the go!
A good choice. BTW, did you bother reading the link I offered?
Brian wrote in message news:umSYb.73142$uV3.527728@attbi_s51...
How am I supposed to post my replies in a newsgroup?:
http://allmyfaqs.com/faq.pl?How_to_post


There it is, again, from the quoted message.

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #12

P: n/a
In article
<40*********************@uq-127creek-reader-02.brisbane.pipenetworks.com
..au>,
"AussieTraders.com.au" <bo****@aussietraders.com.au> wrote:
Should I use <font size=-2> or <font size=1>?? They seem to give the same
results...

I wish to be able to set the default font family and font size for a website
and STILL SUPPORT _fluid_texts_.


You should not be using <font></font> at all.

--
| Andrew Glasgow <amg39(at)cornell.edu> |
| "We deal in the moral equivalent of black holes, where the normal laws of |
| right and wrong break down; beyond those metaphysical event horizons |
| there exist ... special circumstances" - Ian M. Banks, _Use Of Weapons_ |
Jul 20 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.