WordPress.org

Ready to get started?Download WordPress

Forums

align left/right not working (10 posts)

  1. erwin33
    Member
    Posted 8 years ago #

    I like to place some images align left or right in my posts. What's the exact HTML/BB code for place an image right or left, <img src="http://www.domainname.com/image.jpg" align=right />
    Is not working.

  2. moshu
    Member
    Posted 8 years ago #

  3. montag
    Member
    Posted 8 years ago #

    This is what I use (in this case the image is on the right):

    <img style="float:right; padding: 10px 0 20px 20px; " src="http://www.where_your_image_is" alt="words" />

  4. erwin33
    Member
    Posted 8 years ago #

    Are there quicktags for this codes? It's al long code to remember.

  5. moshu
    Member
    Posted 8 years ago #

    No, but you can add them anytime. See the guide:
    http://www.tamba2.org.uk/wordpress/quicktags/

  6. erwin33
    Member
    Posted 8 years ago #

    Ok thanks. Is it possible that someone can place the code here so I make file in my texteditor and upload it to the server. I'm not so handy with HTML;-). Thanks a million.

  7. moshu
    Member
    Posted 8 years ago #

    Here is a quick and dirty solution for you:
    http://www.transycan.net/abc/quicktags_for_images.txt
    Instructions:
    1. Go to your wp-admin/ directory and backup your quicktags.js file (e.g. re-name it)
    2. Save the above .txt file as quicktags.js and upload it to your wp-admin folder
    3. You will have a quicktag "img" and another one "imgr". Use the first one for images you want on the left and the "imgr" ==> for right.
    4. If you want to modify the padding between the image and the text of your post, go to the end of the file and find the lines with 20px in them. Edit.

  8. diretribe
    Member
    Posted 8 years ago #

    Another alternative is to include these "long" codes in CSS e.g. as...

    img.alignright {float:right; padding: 10px 0 20px 20px; }
    img.alignleft {float:left; padding: 10px 20px 20px 0; }

    Then you can simply do:

    <img src="" class="alignleft">

    Much easier.

  9. erwin33
    Member
    Posted 8 years ago #

    Ok thanks, and in which file I can put the CSS code?

    Sorry, It works now. When I put the code <img src="" class="alignright"> or left it works. Thanks!

  10. erwin33
    Member
    Posted 8 years ago #

    And I also try to make quicktags with the above instructions. I also have buttons for my rss feed and mp3 file as a quicktag. So I place the code of this buttons in the new text, so I don't lose this buttons. But I don't see the button for imgr yet. What's wrong??

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.