Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with text on the left. 1

Status
Not open for further replies.

oppcos

Programmer
Dec 1, 2004
209
US
Hi,
I've got a requirement to have text float over to the right edge of the browser but stop and not go further than a certain amount of pixels from the left if the browser is resized too small. I've posted an example of the effect (or as far as I've gotten with it) here.

Right now it is pushing the content on the left down in IE and generally not stopping where I want it to. I've messed with margins but am now stuck. Help?

Thanks
 
Yeah this one is difficult to achieve in IE since it doesn't support the min-width attribute.
As for your boxes overlapping use position: relative.

M. Brooks
 
Position relative didn't change anything. Position absolute for one of the boxes stops them from affecting each other but I still don't get the stopping at a certain width effect.

How would min-width achieve the right effect if it were supported?
 
The attribute min-width keeps the window or object from being compressed when the browser window is resized.

I would also check your page on FireFox since the objects within your page collide when the browser is resized.

M. Brooks
 
Right, in FireFox the floating div slides under the left content, so different but equally unwanted. I think I see what you're saying about min-width. Suggesting we set a min-width to the browser window in general? A good idea, though to throw another wrench in the works, other than the image that will be on the left which is a certain # of pixels wide, I'm trying to keep everything else in terms of em's (because I have bad vision and appreciate sites that don't break horribly when I up the text size). As such, I'd have to add ems and pxs to figure out the minimum width.. talk about things not supported in IE.. ;)
 
Well, here's the solution I ended up with, in case anyone else has this problem. It isn't too bad, actually. Works great in IE and Opera, but for a change Firefox is the odd man out, though the effect is nearly as good there (messes up a bit when things get extra special squishy).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top