Without splitting the string and with CSS only, is it possible to achieve the effect below?
<img class="image-in-text" src="www.imgurl.com/img.png">
<span class="text-around-image">
Text goes here
</span>
http://jsfiddle.net/s6hp92c4/
yes,
you can use a floatting element to push down your floatting image.
see demo below using a pseudo element :
body {
font-family: sans-serif;
font-weight: 300;
line-height: 1.5em;/* set the unit to make sure it is applied in any browser */
}
div:before {
content: '';
padding-top: 3em;/* 2x 1.5em line-height */
float: left;
}
img {
float: left;
clear: left;
padding: 5px 10px 1px 0;
}
<div>
<img src="http://fillmurray.com/88/88"/>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
facilisis luctus, metus</p>
</div>
http://jsfiddle.net/s6hp92c4/4/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With