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

  • SEARCH
  • Home
  • 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 7664115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:13:21+00:00 2026-05-31T14:13:21+00:00

When using percentages (%) for the sizing of my elements, Chrome apparently prefers to

  • 0

When using percentages (%) for the sizing of my elements, Chrome apparently prefers to make up its own rules mathematically.

It is my understanding that when you add 80 + 20, you get 100; right? Okay good. Chrome understands this too. But what if we write the same equation differently. For instance: (78 + 1 + 1) + (18 + 1 + 1) What’d you get? Was it 100? Yeah, me too.

So then can somebody please tell me why Chrome thinks otherwise?

Take two elements and float them alongside one another. Then, apply width:20% to one element and width:80% to the remaining element. You’ll notice that 100% of the page (or container) has been occupied by both elements side-by-side. However, let’s keep it simple and add a padding of only 1% to both sides of each element. This means one element will have width:18%; padding:1% and the other element will have width:78%; padding:1%. In theory, this should still have the same result: 100% of the page (or container) is occupied by both elements side-by-side. But in Chrome, this simply isn’t so. It falls short.

The proof is in the pudding: jsfiddle (you’ll notice the slight differences if you’re using Chrome).

It’s frustrating because when it all adds up, especially with a higher volume of elements being used side-by-side, it can really throw a layout out of whack. I know that by creating child elements to take care of padding and/or the margins, we can avoid the situation, but this can lead to the use of markup that would otherwise be redundant.

I just need an explanation as to why Chrome behaves this way (maybe it’s a Webkit thing altogether, I haven’t tested it yet).

  • 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-05-31T14:13:23+00:00Added an answer on May 31, 2026 at 2:13 pm

    It’s a bug.

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

Sidebar

Related Questions

(code examples are python) Lets assume we have a list of percentages that add
Without using percentages, is it possible to position a background image 2px from the
Is it better to describe improvements using percentages or just the differences in the
I am calculating percentages in Analysis Services 2008 using MDX by dividing the sum
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I have tried the recommended approach for percentage sizing of rows in LinearLayout using
I have a list of integer percentages which I need to print using the
I've been using pixel defined width and height dimensions for my HTML elements so
i am trying to create a css layout using pixels and percentages. the reason

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.