The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

randomized posts – css trouble

  • # July 9, 2013 at 3:41 pm


    I am working on a wp-based page based on Chris’ excellent [Randomized grid of posts]( “Randomized grid of posts”)

    The layout of the posts basically switches between two different classes:

    class 1: Image is 100% width – text content underneath
    class 2: Image is 50% width left aligned – text content right aligned

    I am having trouble in aligning my content in the posts, when there is no image attached in the class 2 type post.

    Hope you can help

    [Link to page]( “Link to page”)

    # July 9, 2013 at 3:48 pm

    I’m not 100% sure, but you may get the results you want if you remove the FLOAT and the WIDTH on all the instances of forsidetitle.

    # July 15, 2013 at 8:35 am

    Thanks Senff, but I guess I need to declare my img.attachment-large with a width, otherwise it would be 100% of the post width?

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

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed