How do I float an image to the lower right while still preserving text flow?
August 8, 2006 6:42 PM
Subscribe
CSS filter: I would like to place an image in the lower right corner of a div, with text flowing around it. Warning, 17kb, 300x300 image inside.
Setup: I have been handed a design by a department which designs for print. The usual "The Web is Not Print" speech fails to impress the higher-ups. If they can see it in Quark or Photoshop, it "should" be able to look like that on the Web.
I have a
div in an HTML document that contains a block of text. I would like an image to sit in the lower right corner of the
div, precisely aligned, with the text flowing around it. The image may not obscure the text, nor the text obscure the image. I have enclosed a example Photoshopped image of my goal, using
lorem ipsum text, with the blue square representing the image to be floated to the lower right. This text may be changed to list or a paragraph, etc. The actual image is rectangular.
Problem Constraints:
- The text must flow around the image. This seems to rule out
position: absolute (which removes the image from the document flow), and the background-image property, which does something similar. Position: relative leaves a gaping hole.
- The text changes, and, to keep things accessible, I'd like this to remain actual text, rather than a Photoshopped piece of text made into images.
- No tables. I'd like to go pure CSS.
- I could use judicious break tags to artificially create my own flow, but then that poses problems with users who increase the size of their text.
- Works in the major (Internet Explorer 6, Firefox, Safari) browsers.
Have the constraints rendered the goal insoluble? Is this a "wait for CSS3" problem? The upper right corner would be a snap with a simple float. Elements, being like helium balloons in a leftward breeze, want to be on the opposite corner from where my goal is. I'm not finding much on the web about this issue, but perhaps I'm not phrasing it correctly in my searches. Or I might just be overthinking it. Perhaps a particular webforum would specialize in these things? Sorry for the long post. CSS issues are rarely ...
terse in their explanation.
posted by adipocere to computers & internet (27 comments total)
2 users marked this as a favorite
posted by The Deej at 6:56 PM on August 8, 2006