Google Answers Logo
View Question
 
Q: Simple HTML Tables Question ( No Answer,   6 Comments )
Question  
Subject: Simple HTML Tables Question
Category: Computers > Programming
Asked by: cdn2005-ga
List Price: $2.00
Posted: 16 Mar 2006 19:58 PST
Expires: 15 Apr 2006 20:58 PDT
Question ID: 708226
Just making a simple table - see code below.  Just want the White
table in the middle to be a narrow border between the 2 Grey tables. 
Please give me the HTML so that Grey boxes are the same but White
table is narrow border in between - currently it is too wide.


<table border="0" width="99%" cellspacing="0" cellpadding="5" height="1">
                    <tr>
                      <td width="23%" bgcolor="#E6E6E6" height="96">
                        <p>&nbsp;</p>
                      </td>
                      <td width="21%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                      <td width="56%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                    </tr>
                    <tr>
                      <td width="100%" bgcolor="#FFFFFF" height="0"
cellpadding="0" colspan="3">
                        &nbsp;
                      </td>
                    </tr>
                    <tr>
                      <td width="23%" bgcolor="#E6E6E6" height="96">
                        &nbsp;
                      </td>
                      <td width="21%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                      <td width="56%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                    </tr>
                  </table>

Request for Question Clarification by efn-ga on 16 Mar 2006 22:27 PST
Try taking out the "&nbsp;".  Does that do what you want?

Clarification of Question by cdn2005-ga on 17 Mar 2006 05:59 PST
I've tried taking out the &nbsp; and specifying the height to 1 or 0
but it remains a wide table - I need it to be a few pixels wide.

Clarification of Question by cdn2005-ga on 17 Mar 2006 07:23 PST
That code that was given below changes the entire format of the tables
- not what I need.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Simple HTML Tables Question
From: ramakanth-ga on 17 Mar 2006 00:58 PST
 
As mentioned by efn-ga, remove the "&nbsp;" and in specify the height
in pixels for the specific <td> element, as follows:

 <td width="100%" bgcolor="#FFFFFF" height="8" cellpadding="0" colspan="3">
 </td>

This will solve the problem.
Subject: Re: Simple HTML Tables Question
From: stevemarsland-ga on 17 Mar 2006 06:53 PST
 
<table border="0" width="99%" cellspacing="0" cellpadding="5" height="1">
                    <tr>
                      <td width="*" bgcolor="#E6E6E6" height="96">
                        <p>&nbsp;</p>
                      </td>
                      <td width="15" bgcolor="#ffffff" height="96">&nbsp;
                      </td>
                      <td width="*" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                    </tr>
                    <tr>
                      <td width="*" bgcolor="#E6E6E6" height="96">
                        &nbsp;
                      </td>
                      <td width="10" bgcolor="#ffffff" height="96">&nbsp;
                      </td>
                      <td width="*" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                    </tr>
                    <tr>
                      <td width="*" bgcolor="#E6E6E6" height="96">
                        &nbsp;
                      </td>
                      <td width="15" bgcolor="#ffffff" height="96">&nbsp;
                      </td>
                      <td width="*" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                    </tr>
            </table>
Subject: Re: Simple HTML Tables Question
From: fullup-ga on 17 Mar 2006 08:01 PST
 
I agree with Ramakanth. This should work:

<table border="1" width="99%" cellspacing="0" cellpadding="5" height="1">
                    <tr>
                      <td width="23%" bgcolor="#E6E6E6" height="96">
                        <p>&nbsp;</p>
                      </td>
                      <td width="21%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                      <td width="56%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                    </tr>
                    <tr>
                      <td width="100%" bgcolor="#FFFFFF" height="5"
cellpadding="0" colspan="3">
                     
                      </td>
                    </tr>
                    <tr>
                      <td width="23%" bgcolor="#E6E6E6" height="96">
                        &nbsp;
                      </td>
                      <td width="21%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                      <td width="56%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                    </tr>
                  </table>
Subject: Re: Simple HTML Tables Question
From: ke7bbk-ga on 17 Mar 2006 16:35 PST
 
Try this:

<table border="0" width="99%" cellspacing="0" cellpadding="0">
 <tr>
  <td width="23%" bgcolor="#E6E6E6" height="96">
    <p>&nbsp;</p>
  </td>
  <td width="21%" bgcolor="#E6E6E6" height="96">
   &nbsp;
  </td>
  <td width="56%" bgcolor="#E6E6E6" height="96">
   &nbsp;
  </td>
 </tr>
 <tr style="height:2px;">
  <td bgcolor="#FFFFFF" cellpadding="0" colspan="3"></td>
 </tr>
 <tr>
  <td width="23%" bgcolor="#E6E6E6" height="96">
   &nbsp;
  </td>
  <td width="21%" bgcolor="#E6E6E6" height="96">
   &nbsp;
  </td>
  <td width="56%" bgcolor="#E6E6E6" height="96">
   &nbsp;
  </td>
 </tr>
</table>
Subject: Re: Simple HTML Tables Question
From: flashnet-ga on 29 Mar 2006 17:45 PST
 
<table border="0" width="99%" cellspacing="0" cellpadding="5" height="1">
                    <tr>
                      <td width="23%" bgcolor="#E6E6E6" height="96">
                        <p>&nbsp;</p>
                      </td>
                      <td width="21%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                      <td width="56%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                    </tr>
                    <tr>
                      <td width="100%" bgcolor="#FFFFFF" height="0"
cellpadding="0" colspan="3">
                       s
                      </td>
                    </tr>
                    <tr>
                      <td width="23%" bgcolor="#E6E6E6" height="96">
                        &nbsp;
                      </td>
                      <td width="21%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                      <td width="56%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                    </tr>
                  </table>

if this not you want ,please use css control table
Subject: Re: Simple HTML Tables Question
From: flashnet-ga on 29 Mar 2006 17:46 PST
 
<table border="0" width="99%" cellspacing="0" cellpadding="5" height="1">
                    <tr>
                      <td width="23%" bgcolor="#E6E6E6" height="96">
                        <p>&nbsp;</p>
                      </td>
                      <td width="21%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                      <td width="56%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                    </tr>
                    <tr>
                      <td width="100%" bgcolor="#FFFFFF" height="0"
cellpadding="0" colspan="3">
                       
                      </td>
                    </tr>
                    <tr>
                      <td width="23%" bgcolor="#E6E6E6" height="96">
                        &nbsp;
                      </td>
                      <td width="21%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                      <td width="56%" bgcolor="#E6E6E6" height="96">&nbsp;
                      </td>
                    </tr>
                  </table>

if this not you want ,please use css control table

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy