centering of right-aligned float

negative margins trickery...

chaotic test page

...a right-aligned float in a centered container, will overflow to the left on narrow windows if the width, min-width and max-width are set right, and the float is given a negative back-side margin...

I'm sorry, but some of this text will disappear beyond the left side of browser-windows made much narrower than 800px. That's what the CSS say, so not much I can do about it.

I have however made this container center pretty nicely on browser-windows wider than 1000px, so it is not all lost.

IE6 and older will need some help to mimic min/max width properly.

CSS & results in tested browsers

width: 100%;
max-width: 1000px; 
min-width: 200px; 
margin: 0 auto; 
min-height: 100px;

#independent div {
float: right; 
width: 100%; 
max-width: 1000px; 
min-width: 800px; 
min-height: 100px; 
margin-left: -600px; 
background: #eee;}


some notes here.

tested browsers:

win2K: 8.5, 9tp2
= fine
= fine
Mac OS-X: 1.2.4
= fine
win2K: 6.0
= in need of help with min/max - otherwise fine.
winXP: 7 (20.mar.)
= fine