Bogdan Cosmin
Bogdan Cosmin

Reputation: 11

How to wrap text around image that is behind text

This would be the situation, i'll try keeping it clear:

<div id="text">
  text...text...
</div>
<div id="image">
  <a href=""><img></a>
</div>

How can I show the image on top and wrap text around the image?

Thanks.

Upvotes: 1

Views: 1072

Answers (2)

Wex
Wex

Reputation: 15695

It's good practice to wrap your text elements in a paragraph tag, although both block-level and inline-level elements will wrap around a floated element:

http://jsfiddle.net/Wexcode/UsvQd/

<div id="text">
    <div id="image"><a href="#"><img src="#" alt="" /></a></div>
    <p>text...text...</p>
</div>

CSS:

#image { float: left; }

Upvotes: 0

Chad
Chad

Reputation: 5408

<div id="image">
    <a href="#"><img style="float:left" /></a>
    text...text...
</div>

Upvotes: 1

Related Questions