WordPress.org

Support

Support » Themes and Templates » [Resolved] Move Feature Picture to side of text

[Resolved] Move Feature Picture to side of text

  • On my current homepage all featured pictures are shown above the text of the article, I would like them to be aligned to either the left or right with the text next to it. I have seen a lot of posts about this in other themes, but none of the fixes seem to work for this theme. Could anyone help?

Viewing 15 replies - 1 through 15 (of 28 total)
  • Hi,You just need to float the featured image to the left , so that text comes automatically to the right.
    locate the class for the featured image and give it float:left
    and you will be done.

    I wasn’t able to find it in my initial search. Why I posted specifically on this theme since I was hoping someone else who used this theme would know what file and where I would need to add that to make it work.

    featured image code is like below

    <?php the_post_thumbnail(); ?>

    you’ll find it most likely in content.php
    but editing directly source files is not recommended, it would be better if you could create child theme and then do the edits so that your changes are not lost when parent theme gets updated.

    http://codex.wordpress.org/Child_Themes

    There is no content.php in this theme, that is why I have been unable to find it. I was hoping someone else who uses this theme had this same problem =\ Really can’t find where to change it at all, checked all the files that I thought would have it and none of them have
    <?php the_post_thumbnail(); ?>

    WPyogi

    @wpyogi

    Forum Moderator

    Can you post a link to your site? It might be a CSS question.

    Sure, XXXXXXXXX still in construction phase so there is a lot of filler stuff.

    WPyogi

    @wpyogi

    Forum Moderator

    I’m not totally sure this will work, but try adding this to your CSS – hopefully the theme has Custom CSS option? If not, you can add it via a plugin such as Custom CSS Manager.

    #lb-content img.wp-post-image {
        float: left;
        margin: 0 20px 10px 0

    Didn’t seem to do anything.

    WPyogi

    @wpyogi

    Forum Moderator

    Oops, I forgot the closing bracket on that:

    #lb-content img.wp-post-image {
        float: left;
        margin: 0 20px 10px 0
    }

    Not sure that will change it – where did you add it?

    I had deleted it already, just re-added it to the top of style.css

    This time it works, I put it way further down last time, guess it was overwritten before. Awesome thanks, now just need to get some padding between that and the text.

    Looks like it does it for both the home page and the actual article page though, but I can deal with that as long as it works on the home page I suppose.

    WPyogi

    @wpyogi

    Forum Moderator

    Actually, the margins are getting overridden, so try this:

    #lb-content img.wp-post-image {
        float: left;
        margin: 0 20px 10px 0 !important;
    }

    WPyogi

    @wpyogi

    Forum Moderator

    If you only want it on the home page, we can do that…change it to:

    .home #lb-content img.wp-post-image {
        float: left;
        margin: 0 20px 10px 0 !important;
    }

    You are the greatest, thank you SOOOO much!!!! =]

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘[Resolved] Move Feature Picture to side of text’ is closed to new replies.