Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Border problem

Status
Not open for further replies.

DKL01

Programmer
Sep 14, 2000
233
US
Hi,

I need to implement a HTML table with border lines for specific rows/ cells. For example, if I have 10 rows I need to have border for rows 2-10. I think we can implement this using STLYE but I’m not sure. I would appreciate if you could provide me some guidelines.

Thanks
 
I'm not sure about CSS, but you can do it by nesting tables. For example..
Code:
<table border=&quot;1&quot;>
  <tr>
    <td>
      <table border=&quot;0&quot;>
        <tr>  
          <td>Hello</td>
          <td>Goodbye</td>
        </tr>
        <tr>
          <td>What's Up</td>
          <td>Nothing</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
That would put a border around the second table, but no border within the second table.

ToddWW
 
If you want to have borders around the individual rows, you could use the following Style properties:

<table border=0>
<tr>
<td>Row1</td>
</tr>
<tr>
<td>Row2</td>
</tr>
<tr>
<td style=&quot;border-style: solid; border-width: 1px; border-color: #000000;&quot;>Row3</td>
</tr>
<tr>
<td style=&quot;border-style: solid; border-width: 1px; border-color: #000000;&quot;> Row4</td>
</tr>
<tr>
<td style=&quot;border-style: solid; border-width: 1px; border-color: #000000;&quot;>Row5</td>
</tr>
<tr>
<td style=&quot;border-style: solid; border-width: 1px; border-color: #000000;&quot;> Row6</td>
</tr>
<tr>
<td style=&quot;border-style: solid; border-width: 1px; border-color: #000000;&quot;> Row7</td>
</tr>
<tr>
<td style=&quot;border-style: solid; border-width: 1px; border-color: #000000;&quot;>Row8</td>
</tr>
<tr>
<td style=&quot;border-style: solid; border-width: 1px; border-color: #000000;&quot;>Row9</td>
</tr>
<tr>
<td style=&quot;border-style: solid; border-width: 1px; border-color: #000000;&quot;>Row10</td>
</tr>
</table>

Otherwise, if you only want to have a single border around rows 2-10, then you will have to use nested tables, as Todd-----------------------------------------------
&quot;The night sky over the planet Krikkit is the least interesting sight in the entire universe.&quot;
-Hitch Hiker's Guide To The Galaxy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top