SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Troubles Centering a Table with Images

    So I have a created a table with images with the width of the table being 940. I have 4 images that I would like to place in the table at least having a couples of pixels separating the images. I have created this code but I'm having trouble centering the entire table. What happens is the table automatically shifts to the right. Any Help would be great.

    Code:
    <table>
    <tbody>
    <tr>
    <td bgcolor="#000000"><a href="http://www.amazon.com/"><img src="http://www.septagonstudios.com/AOSIMAGES/gal1.jpg" alt="" width="230" height="300"></td></td>
    <td bgcolor="#000000"><a href="http://search.barnesandnoble.com"><img src="http://www.septagonstudios.com/AOSIMAGES/gal2.jpg" alt="" border="0" width="230" height="300"></td>
    <td bgcolor="#000000"><a href="http://search.barnesandnoble.com"><img src="http://www.septagonstudios.com/AOSIMAGES/gal3.jpg" alt="" border="0" width="230" height="300"></td></td>
    <td bgcolor="#000000"><a href="http://search.barnesandnoble.com"><img src="http://www.septagonstudios.com/AOSIMAGES/gal4.jpg" alt="" border="0" width="230" height="300"></td></td>
    <td bgcolor="#000000"></td>
    </tr>
    </tbody>
    </table>
    ]

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    It's not really clear what layout you are aiming at here. Do you have a link or a screen shot?

    A table is not really the right element for this kind of layout.

  3. #3
    SitePoint Zealot
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://aosgn.septagonstudios.com/

    I want to have the colored images centered. Im not concerned about the height at the moment just the width of the individual images. These are p[laced in wordpress text widget with code provided above. Im using the RockWell Theme from Freshface,
    ]

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,598
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    I can't tell which part of that page to look at. I it the part with the colored boxes? They look centered and nicely spaced to me in Firefox.

  5. #5
    SitePoint Zealot
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In Chrome they look off centered. Maybe its a browser thing. Can that be possible.
    ]

  6. #6
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    5,342
    Mentioned
    214 Post(s)
    Tagged
    5 Thread(s)
    It can, but I've had a look in Firefox, Chromium and Epiphany (another Web-Kit browser) - all on Linux - and I'm not seeing any alignment problems, either.


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
  •