SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Threaded View

  1. #1
    Web Enthusiast
    Join Date
    Jul 2000
    Western Massachusetts, USA
    0 Post(s)
    0 Thread(s)

    table and image alignment

    I have a table comprised of headings and images. I want to center the table on the page.

    My mark up is:

    HTML Code:
    <div class="txt_cntr">
    <table summary="This table shows two ways to go" class="hm_pg_img_table">
        <td><h2><a href="/custom.php" title="Guidance">Guidance</a></h2></td>
        <td><h2><a href="/basics.php" title="Do it yourself">Do it yourself</a></h2></td>
        <td><a href="/custom.php" title="Guidance"><img alt="Guidance" src="" /></a></td>
        <td><a href="/basics.php" title="Do it yourself"><img alt="Do it yourself" src="" /></a></td>
    My CSS is:
    .txtcntr { 
    text-align: center; 
    /* Removes border & collapses */
    table { 
        border-collapse : collapse;
        border-spacing : 0;
    /* home page image table */
    .hm_pg_img_table {
        min-width: 425px;
    Why is the table not centering within the div? What's the best way of making this happen? The url is: (removed)
    Last edited by paulcj2; Feb 7, 2009 at 12:40.
    Paul C.


Posting Permissions

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