473,395 Members | 1,348 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to float image surrounded by text on 4 sides

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>

Jul 23 '05 #1
2 6694
ri**********@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

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 23 '05 #2
ri**********@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
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Geoff Soper | last post by:
I'm trying to get some text to lie to the right of an image. If the text is deeper than the image I want the text to continue with its left margin following the line projected down from the right...
9
by: steven | last post by:
Hi, I can float the image left or right so the text will float around it, but only if the top of the image is aligned with the start of the paragraph. I'd like the image be a little below that, so...
2
by: mike | last post by:
Hello, What I would like is to float some text around the image where the text starts align on the left or right of the image aligned to the top of the image and then wrap around the image. I have...
9
panachepad
by: panachepad | last post by:
I arrived here from a websearch that found this thread from your archives: http://www.thescripts.com/forum/thread97805.html It helped me to understand that I am on the right track, but I still have...
8
by: DarkSaturn | last post by:
Is there a method of using the CSS float command on images to contain itself within a single paragraph? The problem I'm running into is trying to use float images on a listing page, I have an...
27
by: GloStix | last post by:
WARNING VIDEO TAKES A WHILE TO LOAD http://screencast.com/t/BWQ6DNtsM I really don't know how to fix this other than putting another div. But I dont' exactly want to do that for every page....
9
by: Lie | last post by:
I've noticed some oddly inconsistent behavior with int and float: Python 2.5.1 (r251:54863, Mar 7 2008, 03:39:23) on linux2 -345 works, but Traceback (most recent call last): File...
5
by: EmmaEliza | last post by:
I have coded my css so that my text links have a background and border which I want to keep but I cant seem to edit the css so that my image links dont have the same thing.... ...
15
dlite922
by: dlite922 | last post by:
I'm back again, Intro: I've got a floating div (outerDIV) with fixed width that contains an image (IMG) and a div that contains a short text (innerDIV) Problem: In FF, the innerDIV is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.