By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,730 Members | 1,480 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,730 IT Pros & Developers. It's quick & easy.

How to float:center; an image in text?

P: n/a
Css only offers float:right; and float:left;

Is it possible, to center an image, floated around by text? Cross
browser funcionality is needed for NS4.7, IE 5.x, Op 6.x, Moz 1.x, Konqu
3.x.

I did try
<div style="width:120px; float:left;">
<img src="schloss.jpg" width="88" height="100">
what did work for :left and for :right margin with floating text around.
How to center the image?

Example:

<html>
<body bgcolor="#FFFFFF" text="#000000">
<table width="630" border="1">
<tr>
<td colspan="3">

&ouml;lkhsdfl&ouml;khsdfl&ouml;khsdf&ouml;lkhsdl&o uml;khsd&ouml;lkhasdfl
&ouml;khfs
asd&ouml;klfhsd&ouml;lhfsd sd&ouml;hiasd&ouml;lhfasd
sd&ouml;oihfsd&ouml;lkhf
sdao&ouml;iahfvsdhf o&ouml;isdhfgv&ouml;shdfgv o&ouml;isdhfoshidfc
&ouml;o&auml;isdhfo&auml;hisdf
&ouml;oisdhfv&ouml;liasdh o&auml;isdhfvo&auml;ihsdf
&ouml;&auml;oisdhfvo&ouml;&auml;ihsd
o&ouml;&auml;isdhfv&ouml;o&auml;ihsd

<div style="width:120px; float:left;">
<img src="schloss.jpg" width="88" height="100">
</div>

&ouml;&auml;oisdhfgv&ouml;&auml;oisdha
sdio&ouml;hfasdh &auml;sdhfgv&auml;ohasdfg sdhfg&auml;lsdjfgv
wefhioopweijf
weojhfgpwerj ihowefwef oiwefghwefg p0wefgpjhwe werjgpej
werjgpjer
oaizhsdfoiasef oiwerfopiweh owezhfowiehf owezhfo wefh
oiwehfopwiehf opiwhefowiehf hsdfljkhsdf
sdlkjsdfj sdkf skdf ljksdf sdkf ksdf sdfjsdfjl
sdafljsdfj psjdfasdfj dofpdfoh dfgpofdgjk dfgdkfgp
kjfdgkhdfg kjhfgkldfh lkdfhglhdf ldfhglhdfg ldfhgldfhg
osdfhgldfh odfhgldhkf ldfhgldfh ldfhgldhg dfhgldfg
dflhgldfhg ldfhgldf ldfhgldhf dflhgldfh dflgldfg
</td>
</tr>
</table>
</body>
</html>
--
Best regards/ MfG,
Gustav Medler
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Gustav Medler" <us********@gmx.net> wrote in message
news:be************@ID-22193.news.dfncis.de...
Css only offers float:right; and float:left;

Is it possible, to center an image, floated around by text? Cross
browser funcionality is needed for NS4.7, IE 5.x, Op 6.x, Moz 1.x, Konqu
3.x.


I would also like to know the answer to this, as to the best of my knowledge
is that you can't. I have tried a variety of method from positioning to
floating and none seems to allow for text warpping around an image that's
not floating left or right. Maybe CSS3?

Andrew
Jul 20 '05 #2

P: n/a
On Thu, 10 Jul 2003 15:06:59 +0100, "Andrew Tang"
<An*********@hotmail.com> wrote:
"Gustav Medler" <us********@gmx.net> wrote in message
news:be************@ID-22193.news.dfncis.de...

Is it possible, to center an image, floated around by text?
I would also like to know the answer to this, as to the best of my knowledge
is that you can't. I have tried a variety of method from positioning to
floating and none seems to allow for text warpping around an image that's
not floating left or right. Maybe CSS3?


I hope not. This sort of thing gets dreamed up by graphical designers
who only look at the pictures and don't care that it makes the text
unnecessarily hard to read. (I guess if they were automotive designers
they'd fit sexy heptagonal wheels.)

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.