Results 1 to 9 of 9

Thread: Getting images side by side.

  1. #1
    Join Date
    Mar 2007
    Posts
    38
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Getting images side by side.

    I copied the CSS code and HTML from this link.

    http://www.dynamicdrive.com/style/cs...image-gallery/

    I put the HTML in the <div id="content">

    But rather than 2 images being side by side they are all stacked up in a row one over the other like its on 4 seperate lines.

    Please help... Thanks in advance.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Layout can be influenced by many interdependent things on a page. We would need a link to your problem page to be certain of what is causing this.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2007
    Posts
    38
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Here is the link. Notice the Team A and Team B are not side by side. That is what I'm trying to accomplish.

    test.html

    Thanks again...

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    <p> elements maintain paragraph styles, meaning next available line, etc. Try removing the <p> tags in that div
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Mar 2007
    Posts
    38
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Tried removing the <p> still nothing.

    I have a feeling its in the CSS code. But just a feeling..

    Thank you.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There are only 4 images on that page and the two team images aren't seen to begin with. When they are, they occupy in turn roughly the same space. I see no:

    like its on 4 seperate lines
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Mar 2007
    Posts
    38
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I see what you are saying but on the image gallery link the 4 photos it shows text links and thats what I'm trying to do instead of thumbnails. BUT even when I use the html for thumbnails it still puts them on top of each other instead of one beside the other.

    I went a head and copied the EXACT code for the images off of the demo site and of course images won't show up however you can still see it stacks them.


    But I want "Team A" and "Team B" to be on the same line and eventually I will have 8 teams I'm just trying to get the code figured out..

    Thanks again.

  8. #8
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Code:
    .gallerycontainer{
    position: relative;
    float: left;
    /*Add a height attribute and set to largest image's height to prevent overlaying*/
    }
    You may have to specify a width: 30em; (30 for example) to ensure they all lay flat.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  9. #9
    Join Date
    Mar 2007
    Posts
    38
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Well I kind of figured it out except in FF it's not centered like in IE.. But For now its there..

    Here is what I got so far.. /test.html

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
  •