SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is it ok to use point size in style sheets?

    right now i am using { font size: 8pt; } in my style sheets, intead of using xxsmall or whatever. Is this ok? it seems to be working fine, just want to know if there is a downside.
    From here on, it's instinctual...even straight roads meander.

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pt is a valid unit of measurement so have at it. Note that there are some cases where browsers might encounter difficulties but the overwhelming majority should have no problems. By the way, when I say difficulties, I don't mean anything that would prevent the user from seeing the content.

    If you want more information on browser quirks with PT, head on over to www.richinstyle.com and look for their "buglist".
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the info creole. That web site is chock full o' good info..although a bit hard to deal with visually
    From here on, it's instinctual...even straight roads meander.

  4. #4
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anything below 9pt may be illegible on a Mac. Also, the user won't be able to resize the text when using absolute measurements such as points. I prefer and recommend font size keywords.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the above mentioned bit about pt rendering poor on a mac is true (its the old 72/96 mac/pc thing)... the same goes for ems at small sizes... try using px to get the same result... although some browsers won't be able to increae it if the user wants to.

    check this site out:
    http://www.thenoodleincident.com/tut...x_lesson/font/

    content is good and there are links to examples at the bottom of the page.

    good luck

  6. #6
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Points aren't absolute -- they vary depending upon platform and such. Points can be resized in ALL browsers. Pixels are absolute.

    -Colin
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  7. #7
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Aes
    Points can be resized in ALL browsers.
    That's not true. Try it.
    Code:
    <!DOCTYPE html 
    	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Font sizes in points suck!</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style type="text/css">
    <!--
    p {
    	font-size: 10pt;
    }
    -->
    </style>
    </head>
    
    <body>
    <p>some text</p>
    </body>
    </html>

  8. #8
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "Pixels are absolute"

    not always... for example on my machine 2 of 5 browsers (mac IE5 and ns6) allow px fonts to be increased...

  9. #9
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i just reread my previous post... it seems that i may have been misunderstood... i mentioned trying px right after i talked about ems... i ment...

    if you need to try to fix a size then use px over pt... you will have better results across the board.

    however, i do suggest the use of relative sizes for anything over the visual equiv. of 10px - anything under that and you might need to use px... so that the small type works on a mac.

  10. #10
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by coffeeKid
    anything under that and you might need to use px... so that the small type works on a mac.
    Any text smaller than 9px or 9pt may be totally unreadable on a Mac.

  11. #11
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, i went with using 8pt. and cheked it on a mac, and everythign seemed fine.

    thanks everyone.
    From here on, it's instinctual...even straight roads meander.


Bookmarks

Posting Permissions

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