image aligning in wordpress!!

Discussion in 'HTML & Website Design' started by oblivion19, Sep 7, 2008.

  1. #1
    Hey

    Im seriously going crazing trying to align the images in wordpress posts.

    many probs occur like

    -some images which are aligned left are not as aligned to the left as others are.

    -when i try to align images with text.. its either too up or down..

    damn it i need a wordpress plugin to handle images...

    please suggest me on what has worked for you..

    n sorry if i sounded grumpy....spending more time on ur images than your content does annoy man..
     
    oblivion19, Sep 7, 2008 IP
  2. arwen54

    arwen54 Active Member

    Messages:
    632
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    60
    #2
    what you need to do is add some code to your WordPress theme's stylesheet- something like this:
    img.centered {display:block; margin: 0 auto 5px auto; border:0; padding:0; }
    
    img.alignright { display: inline; border:0; margin:5px 7px 0 7px; padding:0; }
    
    img.alignleft { display: inline; border:0; margin:5px 7px 0 7px; padding:0; }
    
    img.border { border:0; padding:0; }
    
    .alignleft { float:left; text-align:left; }
    
    .alignright { float:right; text-align:right; }
    
    Code (markup):
    of course you can adjust the margin attributes to whatever you prefer
     
    arwen54, Sep 7, 2008 IP