Click here to get back home

how to float image surrounded by text on 4 sides

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
how to float image surrounded by text on 4 sides richards1052 02-20-2005
Posted by richards1052 on February 20, 2005, 8:17 pm
Please log in for more thread options


I write a blog & have html code which I use to float images right &
left in my posts. But I often see images surrounded by text on all 4
sides. Can anyone tell me a not too complex way I can do this? Here's
the image (float left) code I use now:

<div><div style="float:left;">
<img style="margin-right: 15px" src="" height="" width="" />
<p style="text-align:center;"><span style="color: blue;"><em> </em>
(credit: )</span></p></div>



Posted by Steve Pugh on February 21, 2005, 10:16 am
Please log in for more thread options


richards1052@comcast.net wrote:

>I write a blog & have html code which I use to float images right &
>left in my posts. But I often see images surrounded by text on all 4
>sides.

Assuming you mean the same piece of text flowing around all four
sides, not seaparate columns of text or anything like that.

On the web? I doubt it, but if you have just look at the source and
see how they do it.

> Can anyone tell me a not too complex way I can do this?

If the image is shorter than the height of a line of text then simply
text <img> text
will do what you want. Otherwise it can't be done.

        Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor



Posted by Lachlan Hunt on February 22, 2005, 12:03 am
Please log in for more thread options


richards1052@comcast.net wrote:
> I write a blog & have html code which I use to float images right &
> left in my posts. But I often see images surrounded by text on all 4
> sides.

This is more of a stylesheet question than HTML; but anyway, there is a
technique to achieve this affect. However, be warned that the technique
used in these articles is very contraversial and should not be (ab)used
lightly. You should carefully consider issues such as accessibility
before using these techniques.

http://alistapart.com/articles/crosscolumn/
http://alistapart.com/articles/crosscolumn2/

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox


Similar ThreadsPosted
Text and Image inside table Alight Text Left and Image right in same cell ?? October 24, 2006, 12:55 am
bug in IE7: a float:right does not float (under certain abs. positioning conditions) October 12, 2007, 6:02 pm
Overflow to the sides of a div October 17, 2005, 3:48 pm
ALT image for text? February 28, 2005, 10:40 am
image alt style pop up for text August 6, 2004, 8:25 am
Image flush with text input box November 19, 2006, 9:42 am
Image maps and area alt text June 14, 2007, 8:08 am
Problem positioning text over an centered image September 22, 2005, 6:07 pm
Newby image/ text wrap question December 18, 2006, 4:46 am
letting a search engine 'see' image text? October 10, 2007, 3:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap