Text changes size

Discussion in 'HTML & Website Design' started by zez, Dec 21, 2004.

  1. #1
    Please can someone tell me how to prevent text size change on the page for diffrent view setting of the text size option in the browser? This makes quite a mess on my site http://www.thailand-huahin.com

    Tanks in advance.
     
    zez, Dec 21, 2004 IP
  2. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Depends on the browser. If you use CSS, not <font>, IE will ignore View > Text Size commands. Firefox will still change font size, though. The good news is that the entire page will be changed, not just a few words, as it happens now with your site.

    So, instead of <font size="6">Hua Hin</font>, either use the style attribute:

    <td style="font-size: 18pt">Hua Hin</td>

    or create a special class and use this class throughout yout pages:

    <head>
    <style type="text/css">
    td.huge-font {font-size: 18pt;}
    </style>
    <body>
    ...
    <td class="huge-font">Hua Hin</td>
    ...

    Since IE only changes font size for style-less elements, this should fix your problem.

    J.D.
     
    J.D., Dec 22, 2004 IP
  3. zez

    zez Peon

    Messages:
    193
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the advice. I will try your suggestion as soon as I find a moment.
     
    zez, Dec 22, 2004 IP
  4. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I wouldn't do that if I were you. Especially not since you are based in the UK.

    People can sue you if you make it inaccessible for them.
     
    T0PS3O, Dec 22, 2004 IP
  5. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #5
    For using CSS? :) This is not a trick - this is how browsers deal with font size. If anybody would be stupid enough to sue for this, they would have to take MS to court. Good luck with that...

    J.D.
     
    J.D., Dec 22, 2004 IP
  6. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It's a fact. No matter how silly it sounds. If you deal with the public in the UK, then your website has to be accessible for everyone. Including the visually impaired. If you fix text size against people's will, even when it's your website, you are discriminating against disabled people and they are free to sue.

    You might want to read up on website accessibility laws. UK: http://www.alistapart.com/articles/accessuk/

     
    T0PS3O, Dec 22, 2004 IP
  7. zez

    zez Peon

    Messages:
    193
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I think in this case I am trying to improve access to all as at the moment when the text size is changed in a browser, part of the headline text is not visable.
     
    zez, Dec 22, 2004 IP
  8. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #8
    No argument there - making a website accessible to anyone is always a good thing. Most browsers, except IE, allow you to change text size in a smart way - Opera will zoom the entire content, Firefox will change font size of the entire page, etc. IE is the only one that behaves this way and only with regards to the text surrounded by <font>. Note, though, that even W3C recommends to avoid using this tag (http://www.w3.org/QA/Tips/font-size). Here's some more info on the reasoning: http://www.mcsr.olemiss.edu/~mudws/font.html.

    As I mentioned, the fact that IE doesn't resize fonts is not a flaw in the website design, but rather a deficiency of the browser, IE in this case. Consequently, people would have to sue MS, not owners of the website.

    J.D.
     
    J.D., Dec 22, 2004 IP
  9. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #9
    But when you put 18pt in the style, it can't be resized anymore. You should use a percentage. That's what I've read anyway.
     
    T0PS3O, Dec 23, 2004 IP
  10. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Yep, use a percentage.
    There are 2Million in the UK who need to use some kind of accessibility software.

    It's a bloody big market to cut off.
     
    SEbasic, Dec 23, 2004 IP
  11. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #11
    IE's Text Size only affects text between <font> tags and, if you use CSS, what's defined as <absolute-size> - any of these strings:

    xx-small, x-small, small, medium, large, x-large, xx-large

    The rest of CSS font size units, it doesn't matter which - pt, px, em, %, etc, will not resize text in IE.

    In general, em's and %'s are recommended (the first one is equal to font-size of either current or parent's font and the last one is relative to the parent's font size).

    J.D.
     
    J.D., Dec 23, 2004 IP
  12. oslocal

    oslocal Peon

    Messages:
    591
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #12
    To hell with UK accessbility,and frak the visually impared if they can't see the font too bad They have no legal power over another persons website, that's the most sillyest thing i've ever heard. Is the UK full of wussy's ?

    if they are visually impared then they should not be browsing the web and if they need font to be larger well won't that be contributing to making their vision even worse ? ha ha what a joke remind me never to go to the UK

    wussy's
     
    oslocal, May 1, 2006 IP
  13. fusionmanx

    fusionmanx Peon

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    wow that is a weird law, anyways ir ead that it is impossible to control it that browsers can overwrite and that the only way to have the site look exactly how you want it is to use an image.
     
    fusionmanx, May 1, 2006 IP
  14. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #14
    That is not actually true.

    cheers,

    gary
     
    kk5st, May 1, 2006 IP