Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts

    Aligning images next to paragraphs - easiest way?

    Hi,

    I have this situation:

    |-------------------------|
    | paragraph |--|
    |
    | paragraph |--|
    |
    | paragraph
    |
    --------------------------|

    The |--| symbolizes images.
    What would be the easiest and most correct way to align the pictures next to the paragraphs? Wrap the paragraphs and images in a div and then float it?
    Last edited by CaptainB; 04-12-2009 at 08:25 PM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello CaptainB,
    They pretty much have to be wrapped together in a div, otherwise they won't line up when you get more than 2 or three. Have a look at a little demo I have at http://nopeople.com/CSS/image%20captions/index.html , see if that gives you any ideas.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    Hey Excavator, thanks for the link.
    I ended up making two floated divs - one for the <p>s and one for the images.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •