[Resolved] image margin-bottom with class="aligncenter"

Home Forums Support [Resolved] image margin-bottom with class="aligncenter"

Home Forums Support image margin-bottom with class="aligncenter"

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #76566
    Sven

    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?

    #76989
    Tom
    Lead Developer
    Lead Developer

    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>
    #77024
    Sven

    it works…thank you!!

    #77031
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.