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 8607661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:24:49+00:00 2026-06-12T03:24:49+00:00

Is there a way to detect if the browser has subpixel precision for elements

  • 0

Is there a way to detect if the browser has subpixel precision for elements ?

IE9, unlike any of the other major browsers, has subpixel precision for its elements (an elements width can be 50.25px) and because of that, I need to treat a thing differently.

One way is to use jQuery to detect the browser name and version, but this is deprecated in jQuery and not recommended, instead being suggested that the existence of features should be tested for not the browsers names and versions.

  • 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-12T03:24:50+00:00Added an answer on June 12, 2026 at 3:24 am

    I’m not sure where you got the idea that IE9 is the only browser that supports fractional pixel units, but that assumption is totally incorrect.

    From section 4.3 of the spec (emphasis added):

    The format of a length value (denoted by <length> in this specification) is a <number> (with or without a decimal point) immediately followed by a unit identifier (e.g., px, em, etc.).

    And defining <number>:

    Some value types may have integer values (denoted by <integer>) or real number values (denoted by <number>). Real numbers and integers are specified in decimal notation only. An <integer> consists of one or more digits “0” to “9”. A <number> can either be an <integer>, or it can be zero or more digits followed by a dot (.) followed by one or more digits. Both integers and real numbers may be preceded by a “-” or “+” to indicate the sign. -0 is equivalent to 0 and is not a negative number.

    Therefore, per spec, the px length unit must support fractional numbers.

    To prove this, take a look at this fiddle in fullscreen and use your browser’s zoom function to zoom all the way in:

    Fiddle screenshot

    In this Chrome screenshot, notice that the 5.5px blue box is indeed taller than the 5px red box.


    I think the confusion might stem from the fact that the non-standard element.clientHeight returns a calculated (rounded) integer value, and that rounding happens differently in different browsers.

    In my fiddle, for the clientHeight of the blue <div>, IE9 and Firefox 15 at 100% zoom give 6. Chrome 22 and Opera 12 give 5. In all browsers, the value of that property changes as the user changes the browser’s zoom level.

    In other words, it’s unreliable.

    If you want to do calculations with the actual, fractional units of an element, use getComputedStyle.

    var el = $('#b')[0]; // the actual DOM element
    var height = parseFloat(getComputedStyle(el).height); // => 5.5
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way that I can detect browser type on routing and use
Is there a way to detect whether or not a browser has SVG capability
Is there any way I can detect when my page has been set as
Is there a way with JQUERY or Javascript, to detect anytime the browser window
Is there a jquery way or plugin to detect the visitor's browser window size
Is there any way to detect if a commercial is playing? I'm using player.observe(models.EVENT.CHANGE,
Is there any way to detect when an app is no longer active? That
Is there a way to detect when a UITextView has finished scrolling? As a
I am curious if there is a way to detect the browser refresh event
Is there a way to detect if the user has 1 monitor or 2?

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.