?
Solved

Changing font size in browser

Posted on 2003-03-13
6
Medium Priority
?
180 Views
Last Modified: 2013-12-03
How do you create text on the web page that can be changed in size by the viewer in his browser by using his change size button?

Simple text I create in Frontpage and Word XP doesn't seem to allow this to happen. It just stays the size set when authored.
0
Comment
Question by:jhint
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Accepted Solution

by:
avner earned 200 total points
ID: 8126888
It depends on the code. FrontPage and word generates a code with CSS font-size defines. if you remove all the font settings (font-size, or font) you will then be able to change the font size with the browser charachter settings.
0
 
LVL 14

Expert Comment

by:avner
ID: 8126889
It depends on the code. FrontPage and word generates a code with CSS font-size defines. if you remove all the font settings (font-size, or font) you will then be able to change the font size with the browser charachter settings.
0
 
LVL 17

Expert Comment

by:dorward
ID: 8127776
0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 2

Expert Comment

by:ActiveMedia
ID: 8146755
You can of course provide different CSS stylesheets (with small, medium and large font sizes) and switch between them using a JavaScript function that is activated by a click of a button that JS displays on each page.

I find this very useful for group training events (small for printing, medium for individual PC screens, large for whole-group data projector).

This approach is more work but gives you MUCH more control of the displays NOT just font-size.

<script language="JavaScript">
document.write('<form><input type=button name=changeSize value="Change text size" onClick="cycleCSS()"></form>');

function cycleCSS() {
   currentCSS=document.styleSheets[0].href;
   if (currentCSS=='small.css') {
      document.styleSheets[0].href='medium.css'
      document.forms[0].changeSize.value='Medium --> Large text';
   }
   if (currentCSS=='medium.css') {
      document.styleSheets[0].href='large.css'
      document.forms[0].changeSize.value='Large --> Small text';
   }
   if (currentCSS=='large.css') {
      document.styleSheets[0].href='small.css';
      document.forms[0].changeSize.value='Small --> Medium text';
   }
}
</script>

See URL below for example of use:

http://www.active-media-solutions.co.uk/international/listitems2.asp


HTH
0
 

Author Comment

by:jhint
ID: 8157620
Thanks. I now have to ask another question. Perhaps it should be a new entry in the system or just an extentsion to this question. But in any case - how do I rid my web page of style sheet code?  I tried the Remove formatting options in Word and Frontpage but they didn't work.  For some reason they don't seem to regard style sheets as formatting?!?!!?

I hope I don't have to do it manually.  Can I set the programs to NOT insert style sheet codes in the first place?
0
 
LVL 14

Expert Comment

by:avner
ID: 8157628
I am not familier with FrontPage and therefore cannot answer, sorry.
0

Featured Post

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question