Grow your CSS skills. Land your dream job.

Aligning Post Titles

  • # April 11, 2013 at 6:31 am

    I am working on a site using the twenty eleven theme in WorPress:

    http://www.makewpwebsites.com/

    I want my homepage to display my most recent posts and i am using 2 plugins. 1) Widgets on pages 2)advanced recent posts widget. This works well however i am having trouble aligning the titles and dates. I want the image to be on the left which they are atm, I also want the post title and dates to align with the post excerpt on the right.

    I shifted them over using margin-left: 280px; and this worked well. However when i increased the title text size the last word goes on to the next line, and doesnt have a margin of 280px i originally set. If you go to my homepage you can see this with the Top 10 WordPress Theme Frameworks test post. How can i get this word to go onto the next line but remain inline with the post excerpt.

    Thank you in advance

    PS is margin-left the best way to align this text.

    # April 11, 2013 at 7:50 am

    Unfortunately, I think it’s going to take some re-structuring of the HTML to achieve what you want.

    I have little knowledge of WP but my guess is that the plugins structure/style the posts differently.

    # April 11, 2013 at 8:53 am

    I used display: block – think this is the best way

    # April 11, 2013 at 9:48 am

    >I used display: block – think this is the best way

    Hey, if it works for you then that’s fine.

    Frankly, I don’t think it’s the **best** way.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".