Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    increasing font size

    hey all,

    I'm building a page that might be visited by some old people.. or other poeple that are hard at seeing. I want to give them the option of increasing the font size by clicking on a link. Any of you have any good ideas?

    My thoughts so far are that I might like to add an internal stylesheet with only one line that overrides my bigger style sheet's font-size and makes it bigger.. but only when the link is clicked. BUT I don't really want to create 2 seperate pages for each page I have now. Maybe it's the easiest way. Any ideas?
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    self.location
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you want to increase the font-size dynamically (without having the page reload), then you'll run into a problem with older browsers like Netscape 4 and Opera 6 ;^]

    These browsers can't dynamically reformat page contents via Javascript (although NS4 can at least *rewrite* layer contents, which is a halfway workaround that Opera still doesn't have).

    Maybe a simple solution would be just to add text to your page instructing users how this can be achieved via each browser's built-in mechanism for adjusting font size:

    Netscape4:
    CTRL [
    CTRL ]

    Netscape 6:
    CTRL -
    CTRL =

    Opera:
    ZOOM function on one of the toolbars

    IE:
    View menu > Text Size
    (this option can also be set as a button on the Personal Favorites toolbar).

    .............

    When doing this, make sure you've not specified any font-sizes in pixels, else any intended resizing will have no effect in NS4 and IE.

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can also have more than one css for the site. One would be normal font sizes and the other would be large font sizes. Using a simple link you can toggle back and forth between the two as needed.
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #4
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't have my font size in pixels, so that could work, but I guess I would feel guilty making someone that is obviously having a hard time reading already go and read a tutorial on how to fix it

    I use Opera as my main browser so I don't want to shaft opera users... but I don't care about NN4 users... update already, it's 5 been years!!

    I also don't care about doing it dynamically... actually I'd rather not. I'm trying to keep my site at W3Cs Triple A rating for accessibility... not cus i'm nice, just cus it's a challenge... hehe

    So I am not using any javascript or anything... I think I am best off just creating another HTML file that's exactly the same except one line of CSS to change the font-size. It wouldn't be too hard to update because it we be the exact same except for that one line. Just copy, paste, add one line, and save as something different. Anybody else agree that that may be the easiest way? Or should I do something... cooler?

    whoever said standards are confining needs to be smacked. wait... i think i said that... eee
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #5
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    webmarket, wouldn't i then need two html pages? one using one css and one using the other? i know you can do it with javascript and cookies but like i just said... i'm not using that...
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #6
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I suppose you could use two separate pages with their own css, but, I was thinking more along the lines of:

    www.straightedge.com/site/styles

    click on the color links and all that changes is the css used...but in this instance a server side language is used.
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts

  • #8
    jtr
    jtr is offline
    New Coder
    Join Date
    Jun 2002
    Location
    Northern California
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    adios,

    Been lookin' for something like that. Thanks much for the link.

  • #9
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    neat

    that is pretty neat ... but guess what im going to say... anyone?

    doesn't work in opera looks great in IE and Moz... but it didn't even show up in opera... now admittedly that may be due to an "old browser" redirect script ... even though opera 6.05 is new.

    I decided to go with a link to an identical html page with an internal style sheet and bigger font. it took me about 2 minutes... true it takes them more time to d/l the other page as opposed to updating dynamically, but they're very small, and it is a better solution for me when my goal is complete accessability.

    -Doug
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #10
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    BUT I don't really want to create 2 seperate pages for each page I have now.
    So much for that...

  • #11
    Regular Coder
    Join Date
    Jun 2002
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I've used this before now

    and it does the trick! Tinker with it so it suits your needs.

    Changes page and font color but not size. Might be worth keeping just incase.

    Put this in the <head> tag

    <script language="VBScript">
    Function DRGB(Red, Green, Blue)
    Dim r, g, b
    If Len(Hex(Red)) < 2 Then
    r = "0" & Hex(Red)
    Else
    r = Hex(Red)
    End If
    If Len(Hex(Green)) < 2 Then
    g = "0" & Hex(Green)
    Else
    g = Hex(Green)
    End If
    If Len(Hex(Blue)) < 2 Then
    b = "0" & Hex(Blue)
    Else
    b = Hex(Blue)
    End If
    DRGB = r & g & b
    End Function

    Sub cmdDocWhite_OnClick()
    Document.BGColor = DRGB(255,255,255)
    End Sub

    Sub cmdDocBlack_OnClick()
    Document.BGColor = DRGB(0,0,0)
    End Sub

    Sub cmdDocRed_OnClick()
    Document.BGColor = DRGB(255,0,0)
    End Sub

    Sub cmdTBlue_OnClick()
    Document.FGColor = DRGB(0,0,255)
    End Sub

    Sub cmdTRed_OnClick()
    Document.FGColor = DRGB(255,0,0)
    End Sub

    Sub cmdTBlack_OnClick()
    Document.FGColor = DRGB(0,0,0)
    End Sub
    </script>

    Controls in the <body> tag.

    input type="button" value="Document - White" name="cmdDocWhite">
    <input type="button" value="Document - Black"
    name="cmdDocBlack">
    <input type="button" value="Document - Red" name="cmdDocRed">

    <input type="button" value="Text - Blue" name="cmdTBlue"> <input type="button" value="Text - Red" name="cmdTRed"> <input type="button" value="Text - Black" name="cmdTBlack">
    Therapy is expensive, popping bubble wrap is cheap, you choose.

  • #12
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hehe yea I know adios... *shrugs* ya can't tell me you've never changed your mind before...
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #13
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Anyone is entitled to change their mind; actually, I was commenting more on the absence of the word 'thanks' (or equivalent) in your post. When I remembered that site, it took me several minutes of searching to locate it (for you). Study the reply prior to yours, it's a useful example of courtesy towards us 'bots out here.

    adios

  • #14
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #15
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What if you don't set a font size at all and leave it to the user's default settings?


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •