Results 1 to 2 of 2

Thread: image issue in simple css table

  1. #1
    Join Date
    Oct 2009
    Posts
    7

    image issue in simple css table

    Greetings,

    I have a simple 2 column table that is fine as long as I have text in it. If I replace the left header cell text with an image (not as a background image), the text in the right header cell starts on the baseline of the image and pushes the row down so there is a huge white gap under the image.

    My simple css is:

    Code:
    #main-table {
    	width: 485px;
    	border-collapse: collapse;
    	text-align: left;
    	}
    	
    #main-table th {
    	padding: 10px 8px;
    	}
    
    #main-table td {
    	padding: 9px 8px 0px 8px;
    	}
    And the HTML is:

    HTML Code:
     <table id="main-table" summary="Iris">
            <thead>
              <tr>
                <th scope="col"><img src="images/iris/Iris.jpg" alt="name" width="169" height="107" /></th>
                <th scope="col"><p><strong>Iris</strong></p>
                <p>email</p>
                <p>Web Development and Publications Coordinator for Iris</p></th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td><strong>Previous Experience</strong></td>
                <td>NA</td>
              </tr>
              <tr>
                <td><strong>Extracurricular Activities</strong></td>
                <td>Volunteer, 
                  International Student Ambassador, Interpreter</td>
              </tr>
            </tbody>
          </table>
    Is the problem elsewhere in my css? Help would be appreciated!

    TIA,

    Chuck
    Last edited by is_numeric; 29 Oct 2009 at 11:30 AM. Reason: added code tags

  2. #2
    Join Date
    Oct 2009
    Posts
    7
    All,

    I fixed it - the issue was I had a blanket css statement that included vertical-align: baseline; which included the table parameters, so it was throwing the image vs. text off.

    Thanks for taking a look,

    Chuck

Similar Threads

  1. Simple (I hope) table issue...HELP!
    By SunDancer in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 30 Mar 2008, 04:02 PM
  2. css background image alignment only works for IE
    By pokinski in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 06 Feb 2007, 08:24 AM

Posting Permissions

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