• Resolved ta100

    (@ta100)


    The pic (landscape, mountains) in the post is 500 pixels wide. The pic is centered but does the same thing even it isn’t in this issue. The text is justified. Notice that the right side of the text in the post comes short. I would expect that the text would extend the same amount beyond the left AND RIGHT SIDES of the image. I cannot find a way to fix this. Do you know how?

    Thank you for your time.

    WP theme: Black Splat WR
    WP 2.8.5
    URL: https://rippedmuscledudes.com/rmd (Please note all adult content is temporarily removed for the purpose of this inquiry, but this is still a site only for adults.

Viewing 9 replies - 1 through 9 (of 9 total)
  • It would appear that if you set the pic to the left, it and the text would be in alignment. For the text to extend on both sides of the pic you might try reducing the image’s size to about 450 and centered.

    Your image is wrapped in “p” tags with the text-align:justify; style.

    <p style="text-align: justify;"><img height="200" width="500" alt="Sedona500x200" src="https://rippedmuscledudes.com/rmd/wp-content/uploads/2009/11/Sedona500x200.jpg" title="Sedona500x200" class="aligncenter size-full wp-image-148"/></p>

    If you were to remove the “p” tags from the image, I think it might snap into place.

    Thread Starter ta100

    (@ta100)

    Jwane: In “edit image,” it makes no difference if I check none, left, center or right. I put in an image that is 300 px wide to show how it does the same thing. For various reasons, I need to have the pics 500 px wide.

    Clayton: I tried the code in your post, then tried it as you can see it in the code now. To get it like the pic code is now in the post, I uploaded the pic while in editing the post in the html mode. Did I misunderstand?

    Baffling, but something has to be doing this.

    If you edit the post using the html editor rather than the visual editor, you may then be able to simply remove the “p” tags from the image and then update the post. Don’t bounce between editors while doing it though. A space between text and image in the visual editor may be interpreted as the start of another paragraph. I think that might be what happened with the image. I think it’s the “p” tag itself causing the issue. Because the content p is defined with “text-align:justify;”. I think eliminating the p tag around the image might be the solution. Just a guess, mind you.

    Thread Starter ta100

    (@ta100)

    Clayton, I just wrote something about this…lol, had no idea you were writing what you just did at the same time. Please reread my last post, thanks.

    Thread Starter ta100

    (@ta100)

    This is the html for the post:

    <img src=”https://rippedmuscledudes.com/rmd/wp-content/uploads/2009/11/Sedona300x200.jpg&#8221; alt=”Sedona300x200″ title=”Sedona300x200″ width=”300″ height=”200″ class=”aligncenter size-full wp-image-161″ />
    <img src=”https://rippedmuscledudes.com/rmd/wp-content/uploads/2009/11/Sedona500x200.jpg&#8221; alt=”Sedona500x200″ title=”Sedona500x200″ width=”500″ height=”200″ class=”aligncenter size-full wp-image-148″ />
    <p style=”text-align: justify;”>This is a fake post with fake name, not open to the public yet. See how this link works! This is the text of a post. It shows the width and position of the text in the blog. The above pic is centered and 500 pixels wide.</p>

    1. – the space is not wide enough to center the 500px img – it 515px take away twice 10px padding for paragraph = 495px –
    solution:

    #contentwrapper {
      width: 520px;
      float: left;
      padding-left: 5px;
      padding-right: 15px;
      }

    2. – the style .aligncenter does not take effect; add img.aligncenter to the style:

    img.aligncenter,
    aligncenter,
    div.aligncenter {
      display: block;
      margin-left: auto;
      margin-right: auto;
      }

    good luck ??

    Thread Starter ta100

    (@ta100)

    Thanks, alchymyth, it works perfectly!

    Also thanks for writing out the full code, which people don’t always do in their replies. It puts things into context so you can really see what the code is supposed to be and why. Despite what some may think, writing the complete code out gets more to the point because it prevents misunderstanding.

    And there you have it. ?? It looks much better now!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘text and pics in post not aligned properly’ is closed to new replies.