Results 1 to 4 of 4

Thread: Set 2 images on the same line

  1. #1
    Join Date
    May 2008
    Posts
    979

    Set 2 images on the same line

    I would like to know how to position 2 images that are side by side, and put one in left and the other right. I first tried to do one class per image, but it does not. I also tried making two div, one for each image, but that has not worked. How does it works, and so clean? How can I make 2 div side by side as with my pictures?

  2. #2
    Join Date
    Feb 2008
    Posts
    194

    Re: Set 2 images on the same line

    Did you tried with the span tag, which is used online as compared to div (but I'm not sure that it work in your case, to be confirmed). Otherwise you can still use the div by adding the attribute float: left (or right).

  3. #3
    Join Date
    May 2008
    Posts
    945

    Re: Set 2 images on the same line

    By default, two images are put side by side

    Unless you meant "to put an image on the left and one right of the screen." In this case it must use floating:

    Code:
    <div> 
    <img id = "left" ... /> 
    <img id = "right" ... /> 
    </ div> 
    
    # left img {
    float: left; 
    }
    
    # right img {
    float: right; 
    }

  4. #4
    Join Date
    May 2008
    Posts
    979

    Re: Set 2 images on the same line

    Ok thank you, it works much good with the float.

Similar Threads

  1. Want 1-line favorites instead of 2-line in IE 8
    By Nicole Kidman in forum Technology & Internet
    Replies: 4
    Last Post: 19-02-2011, 10:32 AM
  2. How to add images to Google Images
    By Monty1 in forum Tips & Tweaks
    Replies: 2
    Last Post: 14-02-2011, 01:15 PM
  3. xcopy command line together with wmplayer command line
    By Aislinn in forum Operating Systems
    Replies: 5
    Last Post: 31-03-2010, 12:13 PM
  4. How to let Java read text file line by line.
    By Visala28 in forum Software Development
    Replies: 3
    Last Post: 04-08-2009, 11:30 PM
  5. To Pay Tax On-Line
    By Basaam in forum Off Topic Chat
    Replies: 3
    Last Post: 25-03-2009, 12:58 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,521,608.89621 seconds with 17 queries