Max text size wih CSS

Discussion in 'Web Design and Development' started by timmillwood, Apr 2, 2007.

  1. timmillwood macrumors 6502a

    Joined:
    Apr 7, 2006
    #1
    I want to have the name of my website at the top of the page in large text rather than a graphic so that it loads quicker and is viewable if graphic are turned off.

    The only problem is that if the user selects to have a larger or smaller text size in their browser it messes up the website.

    it is possible to set a min and max text size so the user cannot change it.
     
  2. epochblue macrumors 68000

    epochblue

    Joined:
    Aug 12, 2005
    Location:
    Nashville, TN
    #2
    Define a base-font size in your body { } block, and use ems everywhere else so the page will look roughly the same everywhere.

    However, I don't think anything you do will prevent the user from being able to change the size of their browser's text if they don't like what you've given them.
     
  3. Sdashiki macrumors 68040

    Sdashiki

    Joined:
    Aug 11, 2005
    Location:
    Behind the lens
    #3
    AFAIK this is impossible and also a big no no in the HTML/CSS world.

    People WANT to be able to change font sizes to suit their needs, and many developers will definitely balk at you for trying to lock people down.

    If you want it a certain size, make it an image. Otherwise, there is no way to truly lock a font size. It sucks, but it does make total sense in the web.
     
  4. tutubibi macrumors 6502a

    tutubibi

    Joined:
    Sep 18, 2003
    Location:
    localhost
  5. timmillwood thread starter macrumors 6502a

    Joined:
    Apr 7, 2006
    #5
    I dont mind users changing the main text size, it is just the title.

    I guess i can't have the best of both worlds. It's either fast load times and shows title when images are off.... or .... slower load times and use image with alt tag for when images are off.
     
  6. epochblue macrumors 68000

    epochblue

    Joined:
    Aug 12, 2005
    Location:
    Nashville, TN
    #6
    Unless the image you're using is of ludicrous resolution, your load time shouldn't be dramatically different if you use the image or not.
     
  7. Sdashiki macrumors 68040

    Sdashiki

    Joined:
    Aug 11, 2005
    Location:
    Behind the lens
    #7
    Broadband is here to stay.

    Who is your audience?

    For instance, my current work is being done on a site that needs to cater to EVERYONE worldwide regardless of anything else.

    You, on the other hand, may only be showing to techsavvy people or a certain clientele, in which case you can best guess their computers/internet connection specs.
     
  8. jsm4182 macrumors 6502

    Joined:
    Apr 3, 2006
    Location:
    Beacon, NY
    #8
    in the css define the size of the font in pixels. That is frowned upon but should be ok just for the header.
     
  9. elppa macrumors 68040

    elppa

    Joined:
    Nov 26, 2003
    #9
    Good Browsers (i.e. not IE) will scale text in pixels with no worries, so that is only a partial solution.
     
  10. radiantm3 macrumors 65816

    radiantm3

    Joined:
    Oct 16, 2005
    Location:
    San Jose, CA
    #10
    IE7 scales px as well now.
     

Share This Page