SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: in a row

  1. #1
    SitePoint Zealot steven012's Avatar
    Join Date
    Dec 2005
    Location
    xi an city,ShanXi Province,China
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    in a row

    How to let the picture in a row?I use table,but they are not the same tall.What's the hell?
    One world,One dream

  2. #2
    SitePoint Member
    Join Date
    Jun 2008
    Location
    USA
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I too was confused when i was beginner in html. the <tr> is for the row, so when you say another <tr> it says another row. Now <td> is column, which must be inside the <tr>. So when you say next <td> that means next column. here is an example code:

    Code:
    <table border="1">
    <tr> // this is your first row
    <td>row 1, cell 1</td> // first column
    <td>row 1, cell 2</td> //this is second column 
    </tr>
    <tr> //this is your next row
    <td>row 2, cell 1</td> // first column
    <td>row 2, cell 2</td> //second column
    </tr>
    </table>
    i have added some comments (in red) and you could remove them later if you copy the code above
    ok?

    and oh for the images make sure they are of the same sizes otherwise you can specify the width of each images. example <img width="300">
    Last edited by seolady; Jul 8, 2008 at 20:59. Reason: add more info

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2008
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the images are not the same height, you can use valign to at least arrange them so they are both vertically aligned. For example

    <tr>
    <td valign=top><img src="1.jpg"></td>
    <td valign=top><img src="2.jpg"</td>
    </tr>


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
  •