Lakshmi Natarajan wrote:

HTML: http://lnataraj.tripod.com/xhtml_css/photo_w_border_var_width2.html
CSS: http://lnataraj.tripod.com/xhtml_css/style.css ...... sorry about the tripod ads - it's free web hosting ;) my code is inside div id="container"

It would have been hard to find among all these pop ups and jingles. And its not free.

My problem is, when I stack them vertically, every other photo (2nd, 4th, etc) has incorrect bottom border only on Mozilla. It's fine on IE and Opera. This is entirely baffling to me. ... I noticed that for other image sizes this does not happen. Could it be some rounding error?

Firefox DomInspector computes the image height to 214.467px (Fx 1.0.5)

That may be a very exact sizing, but the old FF had some difficulties with fractions of a CSS pixel (internally, it computes on a twentieth of a point, TWIP). So rounding is not an error, but inevitable, sometimes rounded up, sometimes rounded-off. They have fixed most of these problems in FF 1.5 beta.

The original image is 400w x 300h

this
.photo300 .image { width:286px; }

forces a ratio of 1 : 1.398...

so the computed height would be ideally 214.5px

Anyway, it should become clear that this sort of image sizing via CSS is not a good idea, when the following elements (your "border") relies on exact positioning of these computed fractional heights.

Ingo

--
http://www.satzansatz.de/css.html
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to