Previous Message
Next Message

wrapping text around images

Sent by Ricky Zhou on 8 September 2005 03:03


> I would like to create a do it yourself page that has an image (possibly two
> or three) per sentence/short paragraph with multiple sentences/short
> paragraphs per page. I would also like the text to start at the top of the
> image(s), possibly 1em give or take to the left. I can get this to work in
> tables (yuck) but can't seem to do it in css.
To achieve this effect, I placed the image in a span floated to the left:
<span style="
position: relative;
float: left;
width: 276px; /* width of the image */
margin: 0 1em 0 0;
">
<img src="http://www.google.com/intl/en/images/logo.gif" alt="Google" style="
display: block;
margin: 0;
padding: 0;
border: 1px solid #C0C0C0;
" />
</span>
To get the 1em of text before the image, just place this code after
the first line of text.

Ricky
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: