font size

Discussion in 'HTML & Website Design' started by Damnnnn, Sep 7, 2009.

  1. #1
    Hi,

    In the past I put some HTML code into my webiste that set my font to be a standard size. Even if a customer changed their text size setting in the view option on the menu bar the font size would stay the same. I just can't remember the code I used for this.
     
    Damnnnn, Sep 7, 2009 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    lol so if somebody wants to increase the font size of your page because they can't read it you want to prevent them from doing this? okay then.. :s
     
    wd_2k6, Sep 7, 2009 IP
  3. Dee2007

    Dee2007 Active Member

    Messages:
    1,185
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    88
    #3
    Well said, not a great idea imho, I would personally find it annoying. If I couldn't read it and couldn't change it then I would just leave, no good sticking around on a site where I can't read the contents ;)

    Dee
     
    Dee2007, Sep 8, 2009 IP
  4. Damnnnn

    Damnnnn Guest

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    true, it's probably best if I accomodate my site for allowing users to do this.
     
    Damnnnn, Sep 9, 2009 IP
  5. BluEditor

    BluEditor Peon

    Messages:
    99
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You could just zoom in your browser using ctrl + scroll button on the mouse.
     
    BluEditor, Sep 9, 2009 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Damnnn: maybe what you want to do is, if the user increases the font size, everything just gets bigger (like what happens with Zoom in browsers that can zoom) without the text pushing boxes out of the way and stuff.
    Not all browsers zoom (safari), and many browsers let you enlarge the font size without zooming (IE, FF). I usually prefer to enlarge text because I don't like images looking crappier with zoom on.

    usually you can do this by setting all your sizes of all your boxes in em, and then also your fonts. It can be tricky, but then as the text enlarges, everything else also enlarges at the same rate.

    Only problems are, images don't grow too (unless you're using the growing image trick), and if you don't set a width on your page then eventually a horizontal scrollbar will appear.

    Someone might also set their OS fonts to something ginormous, not in the browser. So your fonts would still get enlarged no matter what CSS you have.
     
    Stomme poes, Sep 10, 2009 IP
  7. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #7
    A quick and handy way to zoom and/or change text size via keyboard shortcuts when viewing web pages:

    When using MSIE .....

    * Zoom out: ctrl + (larger - repeat until desired size is obtained)
    * Zoom in: ctrl - (smaller - repeat until desired size is obtained)
    * Return to original size: ctrl 0 (zero)

    When using Firefox ..... same as with MSIE (You can specify "change text size only" in Firefox via the top menu bar: View ---> Zoom ---> Zoom Text only. Setting remains until changed. The above keyboard shortcuts will now only change the text size leaving the image sizes as original).

    When using Safari/Chrome ..... same as with MSIE except the keyboard shortcuts only change the text size leaving the image sizes as original.

    When using Opera ..... same as for Firefox/MSIE except use shift + for Zoom out.

    Visitors who use a scrolling mouse can zoom/increase text size very fast via ctrl scroll -- for all Browsers listed above -- keyboard shortcut ctrl 0 (zero) returns to original size.

    Web developers/authors might want to check pages they are composing to be sure navigation is not affected by incremental zooming (visitors will seldom zoom more than three increments). In my experience, many visitors (especially those with diminished vision) to web pages now increase the text size by one or two increments for easier reading especially when very small text is encountered.

    James
     
    jamesicus, Sep 10, 2009 IP
  8. forextrendalerts

    forextrendalerts Guest

    Messages:
    132
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    The <font> tag specifies the font face, font size, and font color of text..
    <font size="3" color="red">This is some text!</font>
    <font size="2" color="blue">This is some text!</font>
    <font face="verdana" color="green">This is some text!</font>
     
    forextrendalerts, Oct 14, 2009 IP
  9. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #9
    The <font> tag is deprecated and its use is not encouraged. CSS is preferred.

    The <font> tag may be your only way to style text IF you are writing HTML for an email client who doesn't even allow you to use inline styles (but I don't know of any who don't).
     
    Stomme poes, Oct 14, 2009 IP
  10. Ckabayan

    Ckabayan Peon

    Messages:
    167
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    too large is not good, I think........
     
    Ckabayan, Oct 15, 2009 IP
  11. Bex7175

    Bex7175 Peon

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    This thread has got me thinking; although I've always tried to steer away from setting a specific font size I do think that I've done it on a couple of my websites. I'm starting to get more familiar with CSS at the moment but I've not done a lot with regard to font within it so I'd appreciate some clarity if anyone could offer it - is there still a way to set a sort of default size within the CSS? If so, with the <font> tag being deprecated, what is the code to use in that instance?
     
    Bex7175, Oct 16, 2009 IP
  12. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #12
    State the element you want to style.

    Set a font size in something other than pixels (because IE6 and below won't let users change a font size set in px). I use em's because they're usually pretty easy.

    In the body, to help IE with enlargement issues, I do this:
    body {
    font-size: 100%; (for some reason, it helps a bug... other people do 101%)
    }

    Later, if I set anyone to 1em, that'll be the user's default. If the user's computer was set to like 30px sized fonts for easier reading, then my 1em will be their 30px. Anything larger than 1em will be larger than their 30px, and anything smaller (.9em etc) will be smaller.

    You can't assume everyone is set to 16px like you hear on teh innerwebz. That's a popular default, but will miss those who need larger text! Don't rely on it. 1em doesn't rely on anything. It's whatever the user chose.

    So your text:

    #main p {
    font-size: 1em;
    }

    want headers larger?

    h1 {
    font-size: 1.8em;
    }

    h2 {
    font-size: 1.6em;
    }

    etc.

    But that's just one way to do it. Search the web, but be wary of the "62.5%" thing. It's supposed to be a handy way to tell how many pixels an em is, but since not everyone has the assumed default font size, it's comparing apples to cows. How many apples = 1 cow?
     
    Stomme poes, Oct 16, 2009 IP