• Hey guys,
    I am trying to create a video section on my blog. http://www.chandlerswatch.com
    I have successfully queried the posts and have them in row and column, but I have been unable to move the images to be more evenly spaced in the section (3 by 3). Here is the code that I have so far…

    [Code moderated as per the Forum Rules. Please use the pastebin]

    The “margin-left” doesn’t seem to work. If I could separate the code into several php tags, that would really help because I could then add a div tag and solve it. Is there a way to style it right inside the get_post_thumbnail? Thanks in advance for any assistance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter chandlerswatch

    (@chandlerswatch)

    Here is the code in pastebin.

    you way of adding ‘styles’ into the code is not valid – you need to add the styling to style.css of your theme;

    restore that line to ‘normal’:

    echo get_the_post_thumbnail($id, 'thumbnail', array('class' => 'alignleft', 'alt' => 'alttext'));

    and, for instance, add this to style.css:

    .griditemleft img.alignleft { margin-left: 30px; display: block; }

    Thread Starter chandlerswatch

    (@chandlerswatch)

    Got it. alchymyth…you are a genius. I saw your comments on a couple of other threads and I was hoping that you would reply. Thanks so much!! That did it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Styling a post thumbnail’ is closed to new replies.