• 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="https://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="https://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

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to center image with drop shadow in blog post’ is closed to new replies.