SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    using em over px

    I'm trying to make my site as scalable as possible, I have

    Code css:
    body {
    	color:#f3f6f6;
    	font-size:62.5%;
    }

    but is this applied to width and height for divs? I changed 780 to 78em and it seemed fine for alot of sections, but once I got to my content section it messed up my site. are there situations when I should and shouldnt use em's? I have them on all my fonts, but was looking for my whole site to scale if possible.

  2. #2
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hi JaymeNYC,
    I changed 780 to 78em and it seemed fine for alot of sections, but once I got to my content section it messed up my site. are there situations when I should and shouldnt use em's?
    I've done sites ( 3 column layout for example ) where the main wrapper was set at around 70em and the lt. & rt. sidebars were set at a fixed px width. Sidebars set at a fixed width for items I didn't want to grow or shrink such as menus and images. The center was totally flexible though.

    George Gunlaug has several Elastic Demos on his Demo Page. Just scroll down till you see Conditional Elastic. He calls this one his working version.

    Here is my Hybrid Three Column demo. Increase and decrease your text size to see all these linked demos in action.

    Hope that helps

  3. #3
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i was told to use em so scaling works fine in internet explorer, I'm on a mac tho so I'm not able to test it if thats the case. But I changed some of my layout back to px, and I guess since em is relative the inner divs got messed up..dunno just guessin


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
  •