www.webdeveloper.com
Results 1 to 2 of 2

Thread: Help with TH and CSS

  1. #1
    Join Date
    Sep 2009
    Posts
    172

    Help with TH and CSS

    All,
    I have the following code:
    Code:
    <table border="1" width="865">
    <tr>
        <th rowspan="2" width="550" height="300"><img src="uploaded/1299272386.jpg" width="550" height="300"></th>
        <td height="190"><img src="uploaded/1299272386.jpg" height="190" width="300"></td> 
        </tr>
    <tr>
        <td height="110" class="highlight"><div class="desc_text">BLACK and WHITE</div></td> 
    </tr>
    </table>
    I then have the following CSS:
    Code:
    td {
    background-color: #FFFFFF;
    color: #000000;
    }
    th {
    background-color: #FFFFFF;
    color: #000000;
    }
    td.highlight {
    color:#FFFFFF;
    font-size:24px;
    background-color: #F49855;
    text-align:center;
    vertical-align:middle;
    }
    When the first image is displayed there is like 5 pixels of white space underneath the image even though the image is the same size as the <th> height. Am I doing something wrong? Why doesn't the image fit perfectly? Thanks in advance.

  2. #2
    Join Date
    Aug 2006
    Posts
    1,942
    You might try adding:

    img {display:block}

    to your css.

    Dave

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles