SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is it bad to use different units within 1 site?

    Such as em, px, pc, mm, cm ??

    For example, I have a paragraph where I am using pixels as the unit for font size, but for line height, I have specified 1.2pc, because it gives it a nice height. Should I find a measurement in px to accomodate the same size at 1.2pc?

    Should the units used be similar?

    Thanks

  2. #2
    SitePoint Addict
    Join Date
    Sep 2003
    Location
    Europe
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Avoid using pc, pt, in, mm, cm units except for print stylesheets. Use px only for fixed size elements like images. Everything else should be sized in % or em to keep in track with the fluid nature of the medium. It is best to size both font-size and line-height in the same units.

  3. #3
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    even for sites that are not fluid. My example has to be my own
    http://www.btkdesigns.com/newbtk/index2.htm

    Even though its pure css, its not fluid due to how I wanted it designed.

    What I have done (not on that page), but the one I am working on now, is apply 12 pixels for the size of the text and 20 pixels for the line height.

    Thanks for the quick response

  4. #4
    SitePoint Addict
    Join Date
    Sep 2003
    Location
    Europe
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wasn't talking about fluid designs. I mean that the medium is fluid: you cannot completely control how a site will be rendered in a browser. People have different resolutions, different fonts, different font-sizes (or resize them), browsers have different defaults etc. This also means that designing for the web is best done in a fluid way. The web is so different from print, we should never forget that.


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
  •