SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    Technically, a bit dim macdan's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    font size in css px or pt

    Hello

    The ususal challenge of getting things consistent between NS and IE raises it's ugly head again.

    For ages I've used "pixels" as a unit of font size but now I'm thinking that "point" may be better - what do people think - what is the most consistent in both?

    Thanks as always
    gorillaweb is a small London based digital design agency.

  2. #2
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    px is probably more consistent. However, it is generally not a good idea to use pt or px for content text. I use px for text which absolutely has to be kept to a certain size, such as text in a navigation menu.

    Try this article for ideas on getting consistent font sizes with CSS.

    http://www.alistapart.com/stories/sizematters/

    The article uses the font-size keywords, which is a good idea for content text, so users who have poor eyesight, say, are able to enlarge the font.
    Last edited by duckie; Jul 4, 2001 at 13:10.

  3. #3
    Next stop: PHP! Marina's Avatar
    Join Date
    Apr 2001
    Location
    Sweden
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Web Monkey recommends using ems. In this article you can read how to use Java Script to get more control over how different browsers display your text.

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2001
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ems are, sadly, even more inconsistent across browsers. If my style sheet is for the screen, I use pixels (because they are screen units) and if it's for print, I use points (because they are print units).

    As for keywords....well their implementation is just a joke.

  5. #5
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by jackiemcghee
    As for keywords....well their implementation is just a joke.
    That's where the article at the link I gave comes in. Have you read it?

  6. #6
    SitePoint Enthusiast
    Join Date
    May 2001
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have now...strange I thought I had read every article on ALA.



    Certainly re-inforces a lot of my own feelings about CSS...they better get it sorted before XML goes mainstream or there is going to be a terrible mess.

  7. #7
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Madison, Wisconsin
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you haven't enough stuff to read, check this out:
    http://www.richinstyle.com/masterclass/lengths.html

    There's info on the strengths/weaknesses of all the length units here.

    Here's my take:

    pixels are good for absolute control, but bad for people who need to adjust fonts in their browser because of seeing impairments.

    em's are bad for IE3 and Nav4, but there are workarounds, including the Web Standard's Browser Upgrade Campaign and www.richinstyle.com 's cross-browser strategies discussed in its Masterclass series of CSS articles. ems are good for users with visual disabilities, and believe it or not, there are actually a good number of people out there who want to resize your fonts, so work with them, not against them

  8. #8
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I feel a rant coming on...

    <RANT>
    I thought CSS was supposed to be the savior of web designers everywhere? Instead, it appears that we now have to learn a completely different set of workarounds to get our sites looking the same in all browsers. Except, now the workarounds are more complicated than before.
    from the above ALA article

    html>body, html>body div, html>body p, html>body th,
    html>body td, html>body li, html>body dd {
    font-size: small
    /* be nice to Opera */
    }
    When will it stop? Everytime someone comes out with a new technology (even if that tech is the best thing EVER)

    1) browser manufacturers are slow to support it.
    2) Because they are slow to support, people are slow to implement it
    3) Return to #1.

    I say lets sit down and say "These are the tech's that we want. This is how we want to implement it. These are their standards."

    I love CSS and want to use it more and more, but I am so tired of hearing people say "My pages are compliant...but I had to use the following tricks to make it compliant." As far as I am concerned your page is not compliant then.

    sick and tired and sick and tired and sick and tired and sick and tired and sick and tired and sick and tired and sick and tired and sick and tired and sick and tired and sick and tired and well...you get the point...
    </RANT>
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  9. #9
    Technically, a bit dim macdan's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I empathise - the more I learn about css the more I like using it - it really solves most of my layout problems. Then you come up against support problems, generally in Netscape, and you feel like you've moved back a step again.

    oh bugger!
    gorillaweb is a small London based digital design agency.


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
  •