468,110 Members | 1,505 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,110 developers. It's quick & easy.

How to float:center; an image in text?

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
2 38318
"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
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.

Similar topics

2 posts views Thread by richards1052 | last post: by
7 posts views Thread by Dan | last post: by
1 post views Thread by JHouge | last post: by
7 posts views Thread by codeex | last post: by
6 posts views Thread by Hendrik Maryns | last post: by
2 posts views Thread by Jason Carlton | last post: by
1 post views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.