WordPress.org

Forums

[resolved] Text doesn't align next to the image (7 posts)

  1. radek_m
    Member
    Posted 10 months ago #

    Hello,

    What I try to accomplish is show three different posts, next to the content. So I placed a post shortcode in a widget.

    The code is:

    [display-posts category="Overig" image_size="thumbnail" posts_per_page="1"]

    When I hit "Save button" and refresh my website, I see the thumbnail of the post and almost beneath the thumbnail the text. Can someone help me align the post title next to the image, approximately at the same height as the image.

    Thanks!

  2. vtxyzzy
    Member
    Posted 10 months ago #

    You probably need to set the 'text-align' property of the container to 'top'.

    If you will post a link to your site where the problem can be seen, someone may be able to give a more specific answer.

  3. radek_m
    Member
    Posted 10 months ago #

    The link to my site is http://consulatum.com/rejestracja-przy-pobycie-krotszym-niz-4-miesiace/ (In the right sidebar are the posts)

    Do you know which page / code I need to change?

  4. vtxyzzy
    Member
    Posted 10 months ago #

    Try adding the lines below to the end of your css/custom.css file:

    li.listing-item a.image {
       float: left !important;
       margin-right: 5px;
    }
  5. radek_m
    Member
    Posted 10 months ago #

    Thanks for your reply. It works!
    But I noticed one thing:

    - When the post title has an minimum amount of characters, the second post will jump to the right of the first post.

    http://consulatum.com/rejestracja-przy-pobycie-krotszym-niz-4-miesiace/

    What do you think I should do?

  6. vtxyzzy
    Member
    Posted 10 months ago #

    Try adding this to the end of your custom.css file:

    ul.display-posts-listing { clear: both !important; }
  7. radek_m
    Member
    Posted 10 months ago #

    It works. Thank you very much!

Reply

You must log in to post.

About this Topic