WordPress.org

Forums

[resolved] Text will not go under images in posts (9 posts)

  1. sociallys
    Member
    Posted 7 years ago #

    Hello,

    I am trying to get my text to appear under my posts in wordpress and it keeps going next to the image how do I fix it? Can someone please help?

    an example of my post is here: http://sociallysuperlative.com/?p=577

    Thank you!

  2. Eric Amundson
    Volunteer Moderator
    Posted 7 years ago #

    Try adding:
    clear:both to style.css (line 226) like so:

    #content p {
    clear:both;
    line-height:20px;
    margin:0;
    padding:0 0 15px;
    }

    Does that do what you're looking for?

  3. sociallys
    Member
    Posted 7 years ago #

    YES! AMAZING THANK YOU SO MUCH!!!

    but the images won't center :(

  4. sociallys
    Member
    Posted 7 years ago #

    does anyone know how i can fix my stylesheet so I am able to center my images in my post?

  5. Eric Amundson
    Volunteer Moderator
    Posted 7 years ago #

    The easiest way to do this with CSS sometimes is to wrap the image in a <div> or other block-level element and applying the styles to the containing element.

    But, try changing this:

    #contentmiddle p img{
    	float: left;
    	border: none;
    	margin-right: 15px;
    	margin-bottom: 10px;
    	}

    to this:

    #contentmiddle p img{
    	float: none;
    	display:block;
    	border: none;
    	margin:0 auto 10px;
    	}

    I'd suggest making it even more specific like so:

    #contentmiddle p img.aligncenter{
    	float: none;
    	display:block;
    	border: none;
    	margin:0 auto 10px;
    	}

    Hope that helps. :)

  6. sociallys
    Member
    Posted 7 years ago #

    FANTASTIC YOU ARE AMAZING!

  7. Eric Amundson
    Volunteer Moderator
    Posted 7 years ago #

    Aw, shucks. Thanks.

  8. laaroo
    Member
    Posted 7 years ago #

    I'm having the same issue... i was able to fix it so that it works in safari, but it still doesn't wrap in firefox. here's a test post:

    http://laaroo.com/goods/fun-with-fred/

    Thanks!

    also... why can't I center the image in my footer??

  9. dagenius
    Member
    Posted 6 years ago #

    Do you think you could view my source and tell me how to fix my css to get the text under the image as well?

    my url is:

    http://dageniusmarketer.com

    I try:
    <div style="clear:both;"></div>

    on a post by post basis, but that breaks the padding for the text, making it look ugly. So what do i change in my css for it to be correct?

Topic Closed

This topic has been closed to new replies.

About this Topic