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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:44:05+00:00 2026-06-14T20:44:05+00:00

Today I stumbled on a simple box styled as follow: div.menubox { background-color: #FFFFFF;

  • 0

Today I stumbled on a simple box
styled as follow:

div.menubox {
    background-color: #FFFFFF;
    border: 1px solid #887777;
    border-radius: 0 5px 5px 0;
    box-shadow: 1px 1px 3px #998888;
    font-family: Lato,sans serif;
    font-size: 12px;
    left: -5px;
    margin-bottom: 2em;
    min-height: 675px;
    overflow: hidden;
    padding: 25px 0 2em;
    position: absolute;
    top: 195px;
    transition-duration: 0.5s;
    transition-property: top;
    width: 215px;
    z-index: 99;
}

It contains an ul and several li. Nothing of exceptional until i ask to firebug to print in console the menubox height.

console.log(document.getElementById("menubox").offsetHeight) returns an outstanding “677.2px”.

It is the first time I step on such strange behaviour (I’m running firefox 17, with firebug 1.10.6, with a bunch of plugins, on an old windows XP installation).

It is a known issue of one of the component or a new “feature”?

ADDENDUM

Removing the border-shadow, border-radius css properties (disabled by via firebug) the result doesn’t change.

chrome reports “649.5999755859375px” uhmm… need further investigation of the
underlying javascript code

EXTRA
Ops, the javascript code was a dead line filling a variable, the true code is
console.log(document.id(“menubox”).getStyle(“height))` so mootools 1.4.5 is the main suspected (issuing manually the command on console return an integer pixel count) on both browser.

The question is still live, though, have you encountered a similar behaviour, there is a workaround (beside rounding manually the result)?

  • 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-14T20:44:06+00:00Added an answer on June 14, 2026 at 8:44 pm

    Fractional parts on pixels is not strange in CSS as it is not a “dott” on the screen rather an angular measurement.

    From the CSS 2.1 documentation:

    “Pixel units are relative to the resolution of the viewing device,
    i.e., most often a computer display. If the pixel density of the
    output device is very different from that of a typical computer
    display, the user agent should rescale pixel values. It is recommended
    that the reference pixel be the visual angle of one pixel on a device
    with a pixel density of 96dpi and a distance from the reader of an
    arm’s length. For a nominal arm’s length of 28 inches, the visual
    angle is therefore about 0.0213 degrees.”

    More information can be found here: http://inamidst.com/stuff/notes/csspx

    My guess is that you are mixing em:s with px:s and that will cause fragmented pixel values to be returned. Please note that there is nothing wrong with the behavior so I would not care as long as you don’t run into trouble. Especially as you only have defined a min-height on the DOM-element.

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

Sidebar

Related Questions

Today I stumbled upon a case where I would readily assume a simple optimization
Today I stumbled upon the possibility to access a DOM element in Javascript simply
Today I stumbled upon this thread: http://www.mathworks.com/matlabcentral/newsreader/view_thread/112560 The question is basically how to make
Today I stumbled upon a question here on Stack Overflow - How do I
I stumbled across this C code today. Can anyone tell me what the 'where'
Today I stumbled upon an interesting bug I wrote. I have a set of
I was thinking earlier today about an idea for a small game and stumbled
Today I stumbled about a Problem which seems to be a bug in the
I've stumbled upon a rather strange issue today with Spring 3.0: There's an abstract
Today I stumbled on createDocumentFragment. I was wondering if the DocumementFragment is supported, and

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.