Click to See Complete Forum and Search --> : Float Right, but stop at 300px


elwell
10-20-2008, 07:02 PM
Hi, I am having trouble figuring out how to do this.
I have a container that floats right, but I need to to stop at a certain point (300px).
When the the user resizes his window it should keep to the right unless it's position is greater than 300px, then it should stay at 300px.
here is my website that needs the fix:
http://www.womeninwarzones.org

Am I being clear, or do I need to restate this? Let me know please.
This may need Javascript...

Shorts
10-20-2008, 07:09 PM
I haven't looked at the page but off the top of my head I would say wrap it in another <div> that has { max-width:300px; }

EDIT:

Also, set that div to be the float:right and text-align:right; just don't add styles to it.

elwell
10-20-2008, 07:40 PM
Thank you!
Perfect!

elwell
10-20-2008, 07:47 PM
Uh-Oh!
I spoke too soon.
It's not working for me in IE6. Any ideas?

Shorts
10-21-2008, 10:45 AM
Ah, IE6 doesn't do max-width, for them you'd probably have to use width:300px;

In general when it comes to IE6 is to just make sure the page is completely workable, if small design flaws appear don't get too stressed out. Just give them a working alternative.