SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Image alignment not working

    For some reason the image alignment is not working on this page: http://spiritmessages.org/readings/. The HTML is:
    HTML Code:
    <div id="attachment_204" class="wp-caption alignright" style="width: 223px"><img class="size-full wp-image-204" title="carol-with-james-van-praagh" src="http://spiritmessages.org/wp-content/uploads/2009/10/carol-with-james-van-praagh.jpg" alt="Carol with James Van Praagh" width="213" height="171" /><p class="wp-caption-text">Carol with James Van Praagh</p></div>
    Code:
    .wp-caption {
        background: none repeat scroll 0 0 #F1F1F1;
        line-height: 18px;
        margin-bottom: 20px;
        max-width: 632px !important;
        padding: 4px;
        text-align: center;
    
    
    }
    
    
    .alignright, img.alignright {
        display: inline;
        float: right;
        margin-left: 24px;
        margin-top: 4px;
    
    
    }
    It aligns fine with just the image, but not when I add a caption. Is this about Wordpress? Is there a temporary fix?
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  2. #2
    SitePoint Addict
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right here it works fine

    The caption is aligned centered under the photo.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    I guess the question is—What is meant by "alignment"?

    Likewise, the caption is centered nicely for me. I suspect the question is why the text doesn't wrap around the image box? If so, then just remove "clear: both" from here (line 35 in style.css):

    Code:
    h1, h2, h3, h4, h5, h6 {
    clear: both;
    font-weight: normal;
    }

  4. #4
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I was talking about the image alignment so the text wraps. Your solution worked. Many thanks.
    Paul C.
    ClickBasics
    http://www.clickbasics.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •