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!

borders in tables

Status
Not open for further replies.

jimberger

Programmer
Jul 5, 2001
222
GB
hi all,

How do i turn off borders on indvidual cells in a table. Is this even possible?

thanks for your time

jim
 
Hi Jim,

This solution is only for IE:

You can turn it off with <TD style=&quot;border: none;&quot;> but when the cell is in the middle of other cells you still see a small border of the cells arround it. So for the cell on the left hand side you code <TD style=&quot;border-right: none;&quot;> , for the cell at the top <TD style=&quot;border-bottom: none;&quot;> , for the cell at the bottom <TD style=&quot;border-top: none;&quot;> and for the cell at the right hand <TD style=&quot;border-left: none;&quot;>

Another way (if you want more cells without borders) is to turn off all the cellborders with <table rules=&quot;none&quot;> and the cell <TD style=&quot;border: 3px;&quot;> or specify a certain 'width' - 'style' - 'color' with <TD style=&quot;border: 3px inset green;&quot;>

Hope this helps,
Erik

here are 2 examples:

first
<table width=&quot;300&quot; border=&quot;5&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; height=&quot;300&quot; bordercolor=&quot;#000000&quot;>
  <tr>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td style=&quot;border-bottom: none;&quot; width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
  </tr>
  <tr>
        <td style=&quot;border-right: none;&quot; width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td style=&quot;border: none;&quot; width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td style=&quot;border-left: none;&quot; width=&quot;100&quot; height=&quot;100&quot;>
        </td>
  </tr>
  <tr>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td style=&quot;border-top: none;&quot; width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
  </tr>
</table>

second
<table rules=&quot;none&quot; width=&quot;300&quot; border=&quot;5&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; height=&quot;300&quot; bordercolor=&quot;#000000&quot;>
  <tr>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
  </tr>
  <tr>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td style=&quot;border: 3px inset green;&quot; width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
  </tr>
  <tr>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
        <td width=&quot;100&quot; height=&quot;100&quot;>
        </td>
  </tr>
</table>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top