Static Font Sizes

Discussion in 'HTML' started by BGW, Jul 7, 2003.

  1. BGW

    BGW Guest

    Hello-
    I'm brand spankin' new to both these forums and HTML coding, so please
    be gentle. . .

    How can I create a static font size? I've got several tables(within
    tables, withing tables. . .) on a page, and while my main text can be
    viewed clearly regardless of whether the viewer has their browser font
    size set to smallest or largest, I need to keep certain text a static
    size so as to fit within a very specific area on screen. When I set
    my browser to "smallest," the text has weird breaks in it, when I set
    it to "largest," it oozes onto multiple lines with more weird breaks
    (my boss wants it on two lines, and two lines only!!!).

    I'm programming with Arachnophilia, and am operating on about a third
    grade level =P, so any assistance would be very much appreciated.

    tia,
    -bgw
     
    BGW, Jul 7, 2003
    #1
    1. Advertising

  2. BGW wrote:
    > Hello-
    > I'm brand spankin' new to both these forums and HTML coding, so please
    > be gentle. . .


    OK, we'll let the white-hot iron cool off for a full three seconds.
    We're soft like that.


    > How can I create a static font size?
    > (my boss wants it on two lines, and two lines only!!!).


    You shouldn't do this terrible thing to your poor unsuspecting visitors!
    But if you must, you can indeed try to make it more inconvenient for
    your users to resize the font-size and force a certain text-flow onto
    them. Here's a solution that might work in some CSS-aware browsers:

    <p style="font-size:10px; white-space:nowrap">I should know better but
    this is <br>a 10px text distributed over two lines.</p>

    Ideally you'd put the style in an embedded or linked stylesheet, but
    since you're using nested tables, it really doesn't matter one way or
    the other.


    Matthias
     
    Matthias Gutfeldt, Jul 7, 2003
    #2
    1. Advertising

  3. BGW

    PeterMcC Guest

    BGW wrote:
    > Hello-
    > I'm brand spankin' new to both these forums and HTML coding, so please
    > be gentle. . .
    >
    > How can I create a static font size? I've got several tables(within
    > tables, withing tables. . .) on a page, and while my main text can be
    > viewed clearly regardless of whether the viewer has their browser font
    > size set to smallest or largest, I need to keep certain text a static
    > size so as to fit within a very specific area on screen. When I set
    > my browser to "smallest," the text has weird breaks in it, when I set
    > it to "largest," it oozes onto multiple lines with more weird breaks
    > (my boss wants it on two lines, and two lines only!!!).
    >
    > I'm programming with Arachnophilia, and am operating on about a third
    > grade level =P, so any assistance would be very much appreciated.
    >


    To set the font size use px - for instance the following would fix the
    contents of the span at10px
    <span style="font-size: 10px">Contents</span>

    BUT

    This is a *very* bad thing to do - tell your boss and quote the other
    responses that this thread will surely bring when you're telling him/her.

    The reason people use "larger" or "largest" is because they can't read the
    text at the normal size - you will ensure that these people can't read your
    web pages if you make it so that they can't use their resize option. It is
    worth noting that it is *their* resize option and designers have no business
    messing with visitors browser functionality.

    And it's not just those with a visual handicap - look at the size of a pixel
    on a 640x480 monitor and then look at a pixel on a 1600x1200 screen -
    there's almost a 3-to-1 proportional difference. Make the text the right
    size for a 1600x1200 screen and it's 3 times too big on a 480x640 screen;
    make it right for the 640x480 screen and it's now unreadably small on the
    1600x1200.

    Alternatively, don't fix the size and work on the basis that the user knows
    better than the designer what size is comfortable for them to read.

    So, ask the boss which they'd prefer - text that fits on two lines or text
    that is readable - it's a simple enough choice. And, if they get the answer
    wrong, you could mention that the accessibility issue can, in the right
    circumstances, put the site on the wrong side of the law. In the US, for
    instance, see http://www.humanfactors.com/downloads/thelaw.asp - and run
    this quote from that page past them "It should be noted that organizations
    concerned with various disabilities have filed lawsuits against commercial
    entities over the issue of Web accessibility."

    Use % or ems and your text will resize in proportion to the user's
    preference - 100% is the default to which they've set their browser so
    larger text is a set at, say, 120% and T&C stuff can go to 90%... The em is
    sized at the visitors browser setting, so 1.2 em =120% and so on.

    BTW - I do appreciate that you're just the messenger - it's not supposed to
    be a rant at you :) Best of luck with the boss.

    --
    PeterMcC
    If you feel that any of the above is incorrect,
    inappropriate or offensive in any way,
    please ignore it and accept my apologies.
     
    PeterMcC, Jul 7, 2003
    #3
  4. BGW

    PeterMcC Guest

    BGW wrote:
    > Matthias Gutfeldt <> wrote in message
    > news:<bec0i3$3dtu0$>...
    >> BGW wrote:
    >>> Hello-
    >>> I'm brand spankin' new to both these forums and HTML coding, so
    >>> please be gentle. . .

    >>
    >> OK, we'll let the white-hot iron cool off for a full three seconds.
    >> We're soft like that.
    >>

    > Aw gee. . .make a girl blush! = )
    >
    >>
    >>> How can I create a static font size?
    >> > (my boss wants it on two lines, and two lines only!!!).

    >>
    >> You shouldn't do this terrible thing to your poor unsuspecting
    >> visitors!

    > It's not for the body text - it's for a sort-of logo. . .
    >

    You could alsways do it as a graphic with appropriate alt text for those who
    don't see graphics.

    --
    PeterMcC
    If you feel that any of the above is incorrect,
    inappropriate or offensive in any way,
    please ignore it and accept my apologies.
     
    PeterMcC, Jul 7, 2003
    #4
  5. BGW

    BGW Guest

    <snip>
    > So, ask the boss which they'd prefer - text that fits on two lines or text
    > that is readable - it's a simple enough choice. And, if they get the answer
    > wrong, you could mention that the accessibility issue can, in the right
    > circumstances, put the site on the wrong side of the law. In the US, for
    > instance, see http://www.humanfactors.com/downloads/thelaw.asp - and run
    > this quote from that page past them "It should be noted that organizations
    > concerned with various disabilities have filed lawsuits against commercial
    > entities over the issue of Web accessibility."
    >
    > Use % or ems and your text will resize in proportion to the user's
    > preference - 100% is the default to which they've set their browser so
    > larger text is a set at, say, 120% and T&C stuff can go to 90%... The em is
    > sized at the visitors browser setting, so 1.2 em =120% and so on.
    >
    > BTW - I do appreciate that you're just the messenger - it's not supposed to
    > be a rant at you :) Best of luck with the boss.


    I agree with you. For the rest of the site, I'm only using %, and
    trying to map out the text so that enlarging it doesn't whack-out the
    rest of the cisual. . .

    My boss is. . .well, she has a visual "ideal" and absolutely no
    technical expertise whatsoever. . . so the project is getting funner
    and funner as I inch closer and closer to the far extremities of my
    capability. . . the only way to keep a step ahead is through the
    assistance of you fine technically supportive people. . .

    Thanks for all the help!! = )
     
    BGW, Jul 7, 2003
    #5
  6. In article <>,
    says...
    > Matthias Gutfeldt <> wrote in message news:<bec0i3$3dtu0$>...
    > > BGW wrote:

    .... ('fixed' font sizes)
    > >
    > > You shouldn't do this terrible thing to your poor unsuspecting visitors!

    > It's not for the body text - it's for a sort-of logo. . .
    >

    ....
    px sizing for fonts is only useful for lining text up with images [1],
    so it seems a reasonable to use that method for a logo (at least no
    worse than using an image, which is the usual way).

    [1] except that some browsers resize px-sized text without resizing
    images, which IMHO is a bug.
     
    Jacqui or (maybe) Pete, Jul 7, 2003
    #6
  7. BGW wrote:
    > It's not for the body text - it's for a sort-of logo. . .


    Ah! OK! A logo should always look the same. For logos, even if they're
    just sort-of, the usual solution is an image, because (as you might have
    noted in this thread) you don't have control over appearances if you use
    HTML&CSS. Create an IMAGE of the text, in the right font, the right
    size, color, whatever special effects that logo needs. And of course
    don't forget to supply the appropriate ALT and/or TITLE attribute values.


    >><p style="font-size:10px; white-space:nowrap">I should know better but
    >>this is <br>a 10px text distributed over two lines.</p>

    >
    > I'm not really CSS-savvy. . . can I just pop that code into my HTML
    > code, even if I'm not using CSS (yet - working on the learnin')?


    Yes. Just copy&paste the paragraph into your HTML code. You can replace
    the Paragraph element with whatever other element you had in mind.


    Matthias
     
    Matthias Gutfeldt, Jul 8, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. coleenholley
    Replies:
    5
    Views:
    1,150
    coleenholley
    Jan 21, 2004
  2. mcp6453

    Font Sizes

    mcp6453, Aug 10, 2003, in forum: HTML
    Replies:
    4
    Views:
    512
    Nico Schuyt
    Aug 11, 2003
  3. Bob

    Font Sizes (yet again)

    Bob, Dec 28, 2003, in forum: HTML
    Replies:
    36
    Views:
    1,229
    Scott_From_PA
    Feb 11, 2005
  4. Bob
    Replies:
    35
    Views:
    1,073
  5. mttc
    Replies:
    2
    Views:
    2,404
    Roedy Green
    Jul 3, 2009
Loading...

Share This Page