Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts

    font size unit and 2 column (1) liquid layout

    I'm gonig to change my layout to a liquid one, where the left will be liquid (fluid), and right will be fixed.
    In the other thread I saw if I specified a container's width and its font in ems, they would resize proportionally. Do you think this is good to incorporate in a liquid layout for the "fixed" width column (right)? Also, I've seen before people doing stuff like setting the font size on the body to 100%, or 101%. Am I going to have to do something like this, or no? The rest of the text would be in ems as well.

  • #2
    Regular Coder kewlceo's Avatar
    Join Date
    Mar 2006
    Location
    California, US
    Posts
    484
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Fonts: Safari has a problem with 101%, but 100.01% in your html element seems to work fine with all browsers. As for me, I usually set my body font size to 62.5% to make it equal to 10px. Thereafter, when using ems, 1.2ems is roughly equal to 12 pixels, and 1.6 ems = 16px, and so on.
    UBERHOST.NET
    Shared, reseller, semidedicated hosting and dedicated server plans.
    DirectAdmin • Installatron • Money-Back Guarantee • 24/7 Support
    Providing "Service Above All Else" since 2005.

  • #3
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    So, I have to put more than 100% on html? Why? If I specified the font sizes without this, would there be differences in browsers or resolutions? And how come?

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Just be sure to set a default font size. With em's you can't always be certain they are rendered the same way in all of the browsers if no default font size is set.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    Regular Coder kewlceo's Avatar
    Join Date
    Mar 2006
    Location
    California, US
    Posts
    484
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by croatiankid View Post
    So, I have to put more than 100% on html? Why? If I specified the font sizes without this, would there be differences in browsers or resolutions? And how come?
    From CSS: Getting Into Good Coding Habits

    [...]some versions of Opera will draw a default font-size of 100% too small compared to other browsers. Safari, on the other hand, has a problem with a font-size of 101%. The current “best” suggestion is to use the 100.01% value for this property.
    UBERHOST.NET
    Shared, reseller, semidedicated hosting and dedicated server plans.
    DirectAdmin • Installatron • Money-Back Guarantee • 24/7 Support
    Providing "Service Above All Else" since 2005.

  • #6
    Regular Coder KevinG's Avatar
    Join Date
    Aug 2002
    Location
    The Matrix
    Posts
    405
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I just changed my div widths to ems and used auto height and then expanded my text in IE and FF to a very large size and everything stayed in place. I kept my fonts sizes in pixels.


  •  

    Posting Permissions

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