I have the following requirements:
- a
<p>
element filled with text - a
<img>
element - the coordinates (x/y) where to position the image
Now I want to position the <img>
element according to my server side calculated x and y pixel values. I do not want to use position:absolute
because I also want the text inside the <p>
element to wrap itself around the image.
Css only would be nice, but using javascript is also possible.
Probably one solution for your problem could be the usage of shape-outside with a polyfill for older versions of IE/FF/Chrome.
I've added some code to your example: http://jsfiddle.net/dnmbpa7f/4/
For further infos about the polyfill see: http://blogs.adobe.com/webplatform/2014/05/12/css-shapes-polyfill/
Best regards, Ionic