Click here to get back home

font-size-bigger-smaller?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
font-size-bigger-smaller? Wilhelm Kutting 09-19-2005
Posted by Wilhelm Kutting on September 19, 2005, 9:04 pm
Please log in for more thread options


Hello, i have a xhtml-page with relative fontsizes.
Now i want to add some font-bigger or font-smaller possibility via a
icon on the page.
Just like pressing Ctrl-+ or Crtl- or Ctrl-0 in Firefox?

Posted by Beauregard T. Shagnasty on September 19, 2005, 7:31 pm
Please log in for more thread options


Wilhelm Kutting wrote:
> Hello, i have a xhtml-page with relative fontsizes.
> Now i want to add some font-bigger or font-smaller possibility via a
> icon on the page.

Why not just tell your visitors to use their browser's font resizing
choices?

"In IE, go to the View > Text Size ... "
"In Mozilla products, press Control-Plus (or) Minus ..."
"In Opera, use Control/MouseWheel... " and so on.

As long as you use percentages for all your font sizing, even IE will
work this way.

> Just like pressing Ctrl-+ or Crtl- or Ctrl-0 in Firefox?

Why reinvent the wheel? <g>

--
-bts
-This space intentionally left blank.

Posted by Stan Brown on September 19, 2005, 8:52 pm
Please log in for more thread options


On Mon, 19 Sep 2005 21:04:43 +0200 in
comp.infosystems.www.authoring.html, Wilhelm Kutting favored us
with...
> Now i want to add some font-bigger or font-smaller possibility via a
> icon on the page.
> Just like pressing Ctrl-+ or Crtl- or Ctrl-0 in Firefox?

Why? People who care enough to do that will figure out how to do it
in their browser. Why waste time reinventing the wheel?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:

http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you

Posted by PDannyD on September 19, 2005, 9:04 pm
Please log in for more thread options


On Monday 19 September 2005 20:04, Wilhelm Kutting(wkutting@arcor.de) wrote

> Hello, i have a xhtml-page with relative fontsizes.
> Now i want to add some font-bigger or font-smaller possibility via a
> icon on the page.
> Just like pressing Ctrl-+ or Crtl- or Ctrl-0 in Firefox?

Is this an acceptable way to do it? It seems to work for Opera8.02 in a HTML
page and doesn't throw any errors in the javascript console. Does it work
for XHTML?

<p onClick="document.body.style.fontSize='200%'">Large text</p>
<p onClick="document.body.style.fontSize='100%'">Normal text</p>
<p onClick="document.body.style.fontSize='50%'">Tiny text</p>

You could replace the explicit instructions with functions instead but I've
not done that here so you can copy-n-paste them straight into your page and
try it for yourself.

Posted by Stan Brown on September 19, 2005, 8:53 pm
Please log in for more thread options


On Mon, 19 Sep 2005 21:04:50 +0100 in
comp.infosystems.www.authoring.html, PDannyD favored us with...
> Does it work
> for XHTML?
>
> <p onClick="document.body.style.fontSize='200%'">Large text</p>
> <p onClick="document.body.style.fontSize='100%'">Normal text</p>
> <p onClick="document.body.style.fontSize='50%'">Tiny text</p>

It doesn't even work for HTML.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:

http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you


Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap