WordPress.org

Ready to get started?Download WordPress

Forums

how to center image with drop shadow in blog post (3 posts)

  1. chickspirit
    Member
    Posted 7 years ago #

    Hi there ~

    I'm writing a blog post and want to center an image that by default usually aligns left of my text.
    I can get the image centered only if I don't use the pic drop option available when creating a post.

    If I enter...

    <div class="center">
    <div class="img-shadow">
    <img id="image74" alt=Cower src="http://www.chickspirit.com/chickdreams/images/2007/06/Cowering.jpg" /></div>
    </div>

    ...in my post it doesn't center.

    But if I enter...

    <div class="center">
    <img id="image74" alt=Cower src="http://www.chickspirit.com/chickdreams/images/2007/06/Cowering.jpg" /></div>

    ...it centers.

    Any suggestions as to what I need to do differently to get my image centered while keeping my drop shadow?

    Thanks,
    Kai

  2. jabecker
    Member
    Posted 7 years ago #

    Probably because .img-shadow has float:left

    .center will span the entire column, so .img-shadow will simply float to the left within the .center div.

    You could try having a separate shadow class that doesn't float.

  3. jabecker
    Member
    Posted 7 years ago #

    P.S. You should also validate, as you have a lot of errors.

    Also, couldn't get your front page to load at all in FF. It killed my browser.

Topic Closed

This topic has been closed to new replies.

About this Topic