Jared
Jared

Reputation: 2096

How to have text wrap around an image?

What's the best approach to achieve the following effect?

[Image Removed by Poster]

I need that text to wrap around the image, which should always be in the bottom right corner. Thanks.

Upvotes: 6

Views: 2490

Answers (4)

themajiks
themajiks

Reputation: 420

Sorry. HTML and CSS has some limitations. This cannot be achieved with CSS or HTML.

Upvotes: 2

chprpipr
chprpipr

Reputation: 2039

Actually is is possible if you're not opposed to non-semantic markup. Take a look at this working example:

http://jsfiddle.net/chprpipr/Zhz2v/

If you set the background image of the container to contain your portrait image, you can get pretty close to what you're looking for.

Upvotes: 2

Dan
Dan

Reputation: 10351

Unfortunately you won't be able to get text to wrap around an image like in publishing software and your example above. What you can do is set the image to float to the right or align to the right and assign margin left to it which will pad the text off of it.

Live example here: http://jsfiddle.net/2bjn3/

Upvotes: 3

Daniel K
Daniel K

Reputation: 7083

you will not succeed on this with pure html/css but if javascript is an option for you might want to have a look at

Upvotes: 4

Related Questions