View Single Post
Old 08-24-2012, 06:25 PM   #12
PageLab
Connoisseur
PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.PageLab ought to be getting tired of karma fortunes by now.
 
PageLab's Avatar
 
Posts: 70
Karma: 515184
Join Date: Sep 2011
Location: Brasília
Device: Kindle3, iPad, Nook, Kobo, Positivo Alfa
One thing that worked for me is to put the image tag inside a "span" and then insert this combo (span + img) inside the paragraph tag, like this:

Code:
<p><span class = "float"><img src="images/image.png" alt = "" />image caption</span>paragraph text</p>
Code:
.float {
	float: left;
	margin-right: 1em;
	margin-bottom: 0.5em;
}
Works with or without the caption.

If the text is a list (ordered or unordered), just insert the combo (span + img) inside the first list item, then add the property "list-style-position: inside;" in the css, like this:

Code:
<ul>
	<li class="inside"><span class = "float"><img src="images/image.png" alt = "" /></span>list item text</li>
</ul>
Code:
li.inside {
	list-style-position: inside;	
}
PageLab is offline   Reply With Quote