Archived topic
image margin-bottom with class="aligncenter"
3 replies · Started by Sven on February 19, 2015
Viewing posts 1–4 of 4
I've inserted a image with text 5 pixels under the image. This works fine with a left aligned image.
<img class="alignleft" style="margin-bottom: 5px;" src="http://.../wp-content/uploads/2015/02/Ilm.jpg"/>
<div style="clear: both;">
<p style="text-align: center;">some text</p>
</div>
But if i change class="alignleft" to class="aligncenter" (to center the image) now style="margin-bottom: 5px;" is ignored and i've some wasted space under the image.
How can i change this behaviour?
I would do this instead:
<div style="text-align: center; margin-bottom: 10px;">
<img src="http://.../wp-content/uploads/2015/02/Ilm.jpg"/>
</div>
<div style="clear: both;">
<p style="text-align: center;">some text</p>
</div>
it works...thank you!!
You're welcome :)
This archived topic is closed to new replies.