User Controlled text sizes

This is a discussion on "User Controlled text sizes" within the Web Page Design section. This forum, and the thread "User Controlled text sizes are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 12th, 2003, 05:59
New Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
User Controlled text sizes

<font face="Tahoma">
<font size="2">
<font color="blue">

As you should be aware, users can control the text size in their browser (View - Text Size - user selection)

I have noticed using CSS that this over-rides the user control - does anyone know if there is away of over-coming this? Or is it, if you use CSS to control your font then thats it?

</font id="blue">
</font id="size2">
</font id="Tahoma">

  #2 (permalink)  
Old Aug 12th, 2003, 06:06
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,950
Blog Entries: 7
Thanks: 7
Thanked 3 Times in 3 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
CSS does overide the text size function of the IE browser.... no easy way round it really other than to just specify a font using the font tag, and leave the size up to the users browser.... you can also make use of the other size tags like h1, h2, etc.

I know with css you can specify text as bigger / smaller and this may be a way forward, although it is nothing I have really looked at before.

Can anyone else shed any light on this?
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #3 (permalink)  
Old Aug 12th, 2003, 06:49
New Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
<font face="Tahoma">
<font size="2">
<font color="blue">

What would be good is if you could detect and use a user specified font - so you would have to use some sort of script to find out what their font setting is on the browser - if medium then use CSS style else use user selected font size.

You could have the stylesheet as an include file in ASP - then using a variable find out what the user text is set to and apply settings for font from there - trick is how do you find out if a user has set their font settings other than medium?

</font id="blue">
</font id="size2">
</font id="Tahoma">
  #4 (permalink)  
Old Aug 12th, 2003, 10:37
Anonymous User
Guest
Posts: n/a
I am not sure how to use the browsers font settings, however, a little trick I have used int he past it to have two CSS files. You can specify both CSS files up front and then switch between the two.

I have used this in two fashions. You can use it for a printer friendly page without having to reload the page or create a seperate page, or you could have a link on your page that says "Larger Fonts" which could switch to the CSS for larger fonts.

Here is an example of the code:

Code: Select all
<textarea name="" cols="100" rows="10" readonly="readonly">

<script language="JavaScript">
<!--
   function printerFriendlyView()
  {
  document.styleSheets[0].href = "/includes/cssprint.css";
   }
			
   function normalView()
   {
  document.styleSheets[0].href = "/includes/css.css";
   }
// -->
</script>

<span class="showonlyinnormalview">[img]Images/bullet3.gif[/img]Previous Page  </span> 
          <% if printerfriendly = "true" then %>
		<span class="showonlyinprinterfriendlyview">[img]Images/printericon.gif[/img]Print This Page  </span>
		<span class="showonlyinnormalview">[img]Images/printericon.gif[/img]Printer Friendly View  </span>
		<span class="showonlyinprinterfriendlyview">[img]Images/bullet1.gif[/img]Return to Normal View  </span>
		<% end if %>
</textarea>
The above example only works in IE, however there is a Netscape version. I will post both examples and a more detailed How To in the CSS/ASP Forums later.
  #5 (permalink)  
Old Aug 12th, 2003, 15:03
New Member
Join Date: Aug 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
CSS font's are easy, just use relative sizes like em or % instead of px.

1em is the same as the normal size of a font, 0.5em is the same as half the size, 2em is twice the size etc...

When using these types of sizes, if someone changes the browser font size, the text will resize along with it. Thats one of the main reasons against using px sizes.
  #6 (permalink)  
Old Aug 12th, 2003, 15:06
New Member
Join Date: Aug 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
http://www.alistapart.com/stories/goingtoprint/

Printer Friendly pages in CSS, no need for any javascript or the like or IE Vs NS version, works in all standards compliant browsers.
  #7 (permalink)  
Old Aug 12th, 2003, 15:20
Anonymous User
Guest
Posts: n/a
That example is an okay way to do it, but there are problems with it. First, it only works when you print the page. If you want to show the user the page that will print first, it does not work. The second problem I have seen with that, is people are not likely to print the page if they don't know that it will print in a clean format.

Good info though.
  #8 (permalink)  
Old Aug 12th, 2003, 15:39
New Member
Join Date: Aug 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
The idea is that they don't need to see what it will be like as you've already done that for them, and Meyer admits in places that people may be unaware the page is setup to print properly, but a note somewhere saying 'This page is set to print correctly' instead of a 'Printer Friendly' link could be used instead.

As sites start using print stylesheets, people will get used to not needing to check if its set as much. Hopefully, eventually, most websites will use a print stylesheet, thus people will EXPECT it to print fine (even if it does look different to the screen).
Closed Thread

Tags
user, controlled, text, sizes

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Curser controlled scrolling gallery Solistic Flash & Multimedia Forum 2 Sep 26th, 2007 16:00
avatar sizes Gerry Webforumz Cafe 15 Sep 2nd, 2007 11:22
IE CSS Hell - Font Sizes In IE & FF weasel Web Page Design 2 Aug 18th, 2007 17:41
Page Sizes Maverick25r Web Page Design 11 Feb 26th, 2007 17:24
image sizes benbacardi Classic ASP 5 May 24th, 2005 20:57


All times are GMT. The time now is 13:16.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43