Viewing 9 replies - 1 through 9 (of 9 total)
  • This is what I use (in this case the image is on the right):

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

    Thread Starter erwin33

    (@erwin33)

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

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

    Thread Starter erwin33

    (@erwin33)

    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.

    Here is a quick and dirty solution for you:
    https://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.

    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.

    Thread Starter erwin33

    (@erwin33)

    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!

    Thread Starter erwin33

    (@erwin33)

    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??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘align left/right not working’ is closed to new replies.