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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:46:40+00:00 2026-05-17T01:46:40+00:00

I have seen many developers writing HTML or CSS inline style widths of 99.9%

  • 0

I have seen many developers writing HTML or CSS inline style widths of 99.9% in places where I would use 100%. Is there any valid reason for using 99.9%? Does it have any effective difference from 100%?

EDIT to retweet MSalters’ very good question: Considering that 99.9% is one pixel off above 500 pixels, why not 99.99%? I’d guess he’s right, that if you’re going with the dirty hack you should use 99.99%, does anyone disagree?

Additional References:

  • @Michael Stum’s comment about the CSS zoom property led me to this interesting link about triggering hasLayout with zoom: http://www.bennadel.com/blog/1354-The-Power-Of-ZOOM-Fixing-CSS-Issues-In-Internet-Explorer.htm.
  • @Andrew Dunn offered this incredibly comprehensive link on hasLayout: http://www.satzansatz.de/cssd/onhavinglayout.html
  • 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-17T01:46:40+00:00Added an answer on May 17, 2026 at 1:46 am

    The hasLayout property

    It’s a dirty hack used to set the IE specific hasLayout property of the element to true. The hasLayout property "determines how elements draw and bound their content, interact with and relate to other elements, and react on and transmit application/user events." Giving an element layout is an easy way to fix many layout related bugs which appear in Internet Explorer.

    What’s with the 99.9%?

    Setting the width to 99.9% is one way to trigger it. The reason you would use 99.9% is because layout is given to an element if its width is set to anything other than auto. Setting it to a percentage prevents the need to use a fixed width.

    After some testing in jsFiddle, I’ve come to the conclusion that it really isn’t necessary to to use a width of 99.9%, using a width of 100% is just as effective. http://jsfiddle.net/3qfjW/2/ (IE-Only). It seems that setting width to 99.9% may have been a common misconception which stuck.. Spread the word people.

    Other methods

    You can also trigger hasLayout using zoom: 1; While this is the preferred method for many, as it doesn’t mess with other style related features of an element, it is also invalid CSS code, which is not an option to use for some developers.


    Further Reading

    For more methods to trigger hasLayout check out: http://www.satzansatz.de/cssd/onhavinglayout.html

    For more information on the hasLayout property check out the MSDN article on hasLayout http://msdn.microsoft.com/en-us/library/bb250481(VS.85).aspx (This is actually a great read, lots of detailed information)

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

Sidebar

Related Questions

I have seen many socket application in which there is use of MSMQ. But
I have seen many developers that add various convenience macros to the Prefix.pch of
I have seen many number of software used for HTML code encryption, the pages
Hi I just got into wordpress theme development and I have seen many developers
possible duplicate Hello friends, I have seen many style files and see that some
I have always wondered why so many Java developers use .do as the extension
I have seen many people suggesting to use dispatch_once to do the singleton: +(MyClass
I have seen many posting this issue in SO. I have gone through those
I have seen many time that far pointers are used to work for TSR.
I have seen many question and applied their results but nothing happens I still

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.