tags:

views:

36

answers:

1

Firebug shows that the style is:

#summary-border {
  background:url("/images/gamma/backgrounds/product.gif") repeat-y scroll right bottom transparent;
  border-color:#D0D0D0;
  border-style:solid;
  border-width:0 1px 1px;
  display:inline-block;      /* this one is shown to be overridden */
  overflow:hidden;
}

But computed style shows border-right-width as 1.1px !?!? (the border-left-width also)

(Update: my coworker just told me it only happens on Firefox on Mac, but not on Linux or PC. And the Firefox I am using is the latest one: Firefox 3.6.11)

It isn't a problem except the width of that div is then made to 957.8px instead of 958px, and the other floated divs needed 958px and so a big pane can't float (because of 0.2px shorter than needed and that div wrapped under the other floated divs)


(more details:)

The original code in the css file is:

#summary-border {
  overflow: hidden;
  display: inline-block;
  border-width: 0 1px 1px 1px;
  border-style: solid;
  border-color: #d0d0d0;
  background: transparent url("/images/gamma/backgrounds/product.gif") repeat-y bottom right; }
A: 

Px in CSS do not describe absolute screen pixels. They are affected by the density of the display. You can read about the details in the CSS-spec.

Daniel
wait a second, if I have a div with 800px width, I expect to be able to float 3 divs across: 600px, 100px, 100px, *OR* 600px 100px 98px with the last div having 1px border on left and right.If you now tell me the border is 1.1 pixels due to screen density and therefore, what floats well on a Samsung display will not float well on a Mac display, how do we design anything?
動靜能量
I must admit, that I don't know why the slightly differing computed values cause a problem. That never caused a problem for me, I don't have a Mac to check for differences, and it probably shouldn't happen. I was merely giving an explanation why computed values differ from declared values.
Daniel