Grow your CSS skills. Land your dream job.

randomized posts – css trouble

  • # July 9, 2013 at 3:41 pm

    Hi

    I am working on a wp-based page based on Chris’ excellent [Randomized grid of posts](http://digwp.com/2010/08/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](http://bluebakery.dk/ “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.

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