[thelist] IE display behavior - image too wide for window

Brent Eades beades at almonte.com
Mon Feb 27 05:08:41 CST 2006

Michael Slater wrote:

> As long as the window is big enough to display the whole picture, Firefox
> 1.5 and IE 6 both show the same, expected behavior. But if the window is too
> narrow to display it all, Firefox just truncates the right edge of the
> picture (which is the behavior I want), whereas IE knocks the start of the
> image down below the end of the left bar (which is a big problem!).
> Am I doing something wrong here? Or is there a bug in IE that I need to work
> around?

Yes, there is a positioning bug in MSIE. Many of them, actually :)

Anyway, this should work:

<div style='position:absolute; left:195px;'>
<img src...

Note that I'm using the 'left' property, not 'margin-left'. The way I 
read the CSS2 spec, setting an offset for 'position:absolute' is 

http://www.w3.org/TR/REC-CSS2/visuren.html -

The box's position (and possibly size) is specified with the 'left', 
'right', 'top', and 'bottom' properties. These properties specify 
offsets with respect to the box's containing block."

Brent Eades	
Almonte, Ontario

More information about the thelist mailing list