a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Automatic Scaling of Base Font (CSS: make em same size on all browsers)

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> Automatic Scaling of Base Font (CSS: make em same size on all browsers)
Page: [1]
 
mitch

 

Posts: 75
From: Edwardsville. IL - USA
Status: offline

 
Automatic Scaling of Base Font (CSS: make em same size ... - 5/3/2006 21:15:48   
I did a couple of searches for this to make certain it was not a repost.
Hope I searched well enuf.

ASBF is a JavaScript function that sets your page's body font-size to whatever % will make 1em equal the pixel size you choose on all browsers. It lets you design layouts as if all browsers have the exact same default font size (e.g., 12px). Very easy to use -- just add one line to the page -- and free. The linked story has more details.
Adaptiveview
http://tinyurl.com/jxnze

Really don't know enough to use it, but it looked usefull.

mitch

_____________________________

jaybee

 

Posts: 14207
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Automatic Scaling of Base Font (CSS: make em same s... - 5/4/2006 5:48:45   
Good find and it will be useful if:

1. He fixes the double render in Safari
2. Visitors don't have js turned off

other than that, font sizes are a pain and anything that sets them all equal is good. :)

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to mitch)
Tailslide

 

Posts: 6366
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Automatic Scaling of Base Font (CSS: make em same s... - 5/4/2006 5:53:25   
My thoughts exactly Jaybee - you'd need a good fall-back position just in case font-wise.

_____________________________

Little Blue Plane Web Design | Land Rover project

:)

(in reply to jaybee)
Tailslide

 

Posts: 6366
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Automatic Scaling of Base Font (CSS: make em same s... - 5/4/2006 6:23:13   
Ah just noticed something.

If you browse with your text-size on larger or largest or whatever in IE (edit: in any browser) and open that demo the font still scales down to make it look 12px. That isn't good as you're messing with people's browser preferences. If I've set my preferred font-size larger, it's because I want it larger. This is a real shame as it would stop me using this script.

(If you look at his example and then scale up the font-size it works fine in any browser).

< Message edited by Tailslide -- 5/4/2006 6:32:05 >


_____________________________

Little Blue Plane Web Design | Land Rover project

:)

(in reply to Tailslide)
caz

 

Posts: 3626
Joined: 10/10/2001
From: Somewhere south of Chester, UK
Status: offline

 
RE: Automatic Scaling of Base Font (CSS: make em same s... - 5/4/2006 8:36:35   
Isn't this just gilding the lilly? With CSS and relative font sizing you don't need to add any script...as Tail says we have no right to mess with the users' preferences and,

quote:

You no longer need to use a CSS hack to give IE6 a percent and every other browser a px value.


Why on earth would I use pixels for font sizing when I can use the more accessible em or %units. :)

_____________________________

Do not meddle in the affairs of cats, for they are subtle and will dance, or more on your keyboard.
Cheshire cat. www.doracat.co.uk

I remember when it took less than 4hrs to fly across the Atlantic.

(in reply to Tailslide)
jaybee

 

Posts: 14207
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Automatic Scaling of Base Font (CSS: make em same s... - 5/4/2006 11:16:53   
Because 1em in one browser is a different size to 1em in another. What it's trying to do, but not quite succeeding is to level the base font so that 1em = say 12px in all browsers rather than 12 in one, 14 in another and so on.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to caz)
caz

 

Posts: 3626
Joined: 10/10/2001
From: Somewhere south of Chester, UK
Status: offline

 
RE: Automatic Scaling of Base Font (CSS: make em same s... - 5/4/2006 11:44:43   
Yes, we have discussed this at length on here and each time we come back to Owen Briggs' work over at The Noodleincident

I truly don't see the need to add javascript where it can be avoided with a little work by designers.

_____________________________

Do not meddle in the affairs of cats, for they are subtle and will dance, or more on your keyboard.
Cheshire cat. www.doracat.co.uk

I remember when it took less than 4hrs to fly across the Atlantic.

(in reply to jaybee)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> General Web Development >> Automatic Scaling of Base Font (CSS: make em same size on all browsers)
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts