• Resolved mduzair

    (@mduzair)


    When I try to align an image left or right in a post, the image gets scrunched.

    Its easier to explain visually, so see this link please: https://uzi.wirelesszer0.com/?p=15

    the code for this section in my stylesheet is:

    img.centered{display:block;margin-left:auto;margin-right:auto;}
    img.alignright{display:inline;margin:0 0 2px 7px;padding:4px;}
    img.alignleft{display:inline;margin:0 7px 2px 0;padding:4px;}

    I just can’t figure out why its getting scrunched like that. Centering the image works fine, changing the margin or the padding in the code has little impact. And the image appears fine in my input window, it is not scrunched at all, but once posted, it gets scrunched.

    please help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael

    (@alchymyth)

    the styles for .alignleft and .alignright in style.css of your theme have a fixed width which is forced onto the image:

    .alignright{float:right; padding:20px; margin-right:20px; background:url(images/next.gif) no-repeat right; width:100px; font-size:11px;}
    .alignleft{float:left; padding:20px; margin-left:20px; background:url(images/back.gif) no-repeat left; width:100px; font-size:11px;}

    remove width:100px; in both styles.

    Thread Starter mduzair

    (@mduzair)

    Works like a charm now. Awesome. thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Aligning images left and right’ is closed to new replies.