Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8445817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:45:28+00:00 2026-06-10T09:45:28+00:00

When setting widths of elements with CSS, I often end up wanting to set

  • 0

When setting widths of elements with CSS, I often end up wanting to set percentage widths that aren’t whole percentages.

Do all (which I doubt) browsers handle decimal percentages in the same way, or do they render differently?

Can I accurately use it for layouts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:45:30+00:00Added an answer on June 10, 2026 at 9:45 am

    Yes they do.

    From my memory:

    In Opera, you cannot set the decimal places of the percentage so, if you set 33.3% it uses only 33% (rather annoying) (edit:Opera may have improved on that in current version as it seems)

    In Firefox, if you have percentages that add up to 100%, the pixels don’t always add up to the 100% of the pixels
    e.g. you have a outer div with three columns all with width: 33.33333%. If the outer div has width 100px, the columns will have 33 pixels and the sum is 99 pixels and not 100.
    (edit: Firefox does better than I remember. Maybe they improved)

    Old IE, I cannot remember IE9 seems to work fine. The bad one of course is IE7, which rounds up (as the IE6, but who cares?). IE8/9 seem to work ok

    Chrome works fine

    Safari: can’t remember


    edit

    Her one can test for oneself
    http://jsfiddle.net/fTpFw/


    conclusion

    After I played with my fiddle in different browsers I think they all have improved. The only bad implementations (from what I want to achieve) in modern browsers is Opera and Safari. IE7 is a stopper, too. If you don’t have to deal with these buggers, you could go ahead and use the percentage widths.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In CSS, when I set an elements width to 100px then I set its
Are there a set of default CSS values that should be in place when
I can set the width and height of my canvas by setting the width
I have contenteditable span with a max-width setting that allows the user to enter
Setting the scene: My asp.net web application carries a version number which is incremented
I am trying to change the color of links inside <li> elements by setting
I've coded myself into a CSS corner. I have a list of images that
The problem is when I try to set height: 20px to all rows this
I'm creating a CSS drop down menu which is going well so far, however
I'm getting absolutely positioned rotated elements position with jQuery .position() method, then setting position-related

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.