Embed an image to line with text (Wordpress)

Discussion in 'HTML & Website Design' started by CashoutChick, Mar 6, 2008.

  1. #1
    Hey everybody. This is probably a noob question, but I'm currently working on a wordpress blog and this is the first time, obviously.
    So I've seen heaps of those blogs posts with the sexy images inline with the text instead of just a simple image <img></img> tag which puts the image in the middle of nowhere in my post!~

    If someone would show me how to do it, I'd appreciate it much! Thank you.
     
    CashoutChick, Mar 6, 2008 IP
  2. Mugatu

    Mugatu Peon

    Messages:
    28
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    codex.wordpress.org/Wrapping_Text_Around_Images

    Hope this helps.

    Sorry I can`t post live links yet
     
    Mugatu, Mar 6, 2008 IP
  3. walkere

    walkere Active Member

    Messages:
    112
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #3
    The link that was posted seems to have a decent overview of the topic. Here's the short version, though.

    You need to create a style for your image. I'd suggest creating one for images that you want on the right side of the text, and one for images that should appear on the left side.

    Add two classes like this to your style.css file.

    .alignright {
      float: right;
    }
    
    .alignleft {
      float: left;
    }
    Code (markup):
    Then all you have to do is apply one of those classes to your img tag to get it to appear on the right or left side of your text.

    <img src="image.png" class="alignright" />
    HTML:
    - Walkere
     
    walkere, Mar 6, 2008 IP