Grow your CSS skills. Land your dream job.

How to place image at the top of the blog posts.

  • # May 28, 2011 at 3:16 pm

    I’m looking to insert an image that would appear above the blog posts and below the menu only on the home page.

    Where would I place that code?

    http://handtherapyrehab.com/

    Thanks

    # May 28, 2011 at 7:51 pm

    Hi Aaronheine!

    Since the “featured” class is only on the home page, you could just add the image as a background image there. Try something like this:

    .featured {
    background: url(http://handtherapyrehab.com/wp-content/themes/PureType/images/logo.jpg) top center no-repeat;
    padding-top: 100px;
    }

    Where the “padding-top” is the height of the image (plus a little extra to add spacing)

    # May 29, 2011 at 10:23 am

    Clever thinking, but actually I may use like a photo slider. So where could I fit an actual div in there?

    # May 29, 2011 at 10:56 am

    Can’t you just add a div above the featured one? I guess I’m not understanding what you mean by inserting an image… don’t you have control over the HTML? It appears that only the home page has the a div named “home-wrapper” instead of “post-wrapper” on other pages.

    # May 29, 2011 at 6:46 pm

    Actually placing a div just inside the container div of the home.php file did it.

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

You must be logged in to reply to this topic.

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