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

Stop text wrapping around image

P: n/a
I have the following code in a webpage:

<p><img src="images/clydesdale.gif" width="100" height="41" style="float:
left;" />
<strong>Test</strong><br />
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et
justo duo dolores et ea rebum. <br />
visit website
</p>

The way I understand things, the text should sit to the right of the image
no matter how much longer than the image it is. The text however is wrapping
around the image which is not what I want.

How can I get the text to not wrap around the image, like when the image and
text are in different table cells.

Thanks

SuzyB
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Suzanne Boyle" <Su**************@NOSPAMyahoo.co.uk> writes:
I have the following code in a webpage:

<p><img src="images/clydesdale.gif" width="100" height="41" style="float:
left;" />

The way I understand things, the text should sit to the right of the
image no matter how much longer than the image it is. The text
however is wrapping around the image which is not what I want.

How can I get the text to not wrap around the image, like when the image and
text are in different table cells.


Put a left margin on the paragraph, and put the image outside the
paragraph.

And put an appropriate alt attribute on the image:
http://ppewww.ph.gla.ac.uk/~flavell/alt/alt-text.html

--
Chris
Jul 20 '05 #2

P: n/a
Ivo
"Suzanne Boyle" wrote
I have the following code in a webpage:

<p><img src="images/clydesdale.gif" width="100" height="41" style="float:
left;" />
<strong>Test</strong><br />
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et
justo duo dolores et ea rebum. <br />
visit website
</p>

The way I understand things, the text should sit to the right of the image
no matter how much longer than the image it is. The text however is
wrapping around the image which is not what I want.

How can I get the text to not wrap around the image, like when the image
and text are in different table cells.


Eh, how about putting them in different table cells?
Or in different paragraphs, where the second has a leftmargin as wide as the
image:

<p style="float:left;">
<img src="images/clydesdale.gif" width="100" height="41" alt="" />
</p>
<p style="margin-left:100px">
<strong>Test</strong><br/>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. <br />
visit website
</p>

HTH
Ivo
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.