SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Threaded View

  1. #1
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,389
    Mentioned
    0 Post(s)
    Tagged
    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">
    <tr>
        <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>
    </tr>
    <tr>
        <td><a href="/custom.php" title="Guidance"><img alt="Guidance" src="http://www.clickbasics.com/image_library/1064.jpg" /></a></td>
        <td><a href="/basics.php" title="Do it yourself"><img alt="Do it yourself" src="http://www.clickbasics.com/image_library/1074.jpg" /></a></td>
    </tr>
    </table>
    </div>
    My CSS is:
    Code:
    .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 11:40.
    Paul C.
    ClickBasics
    http://www.clickbasics.com


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
  •