Kiddy
Kiddy

Reputation: 139

How to hide a particular cell border?

I try to make the following table which the upper left hand corner cell has no border, could anyone help?

   ----
   |  |
-------
|  |  |
-------

Here is the code

<html>
<body>
<table border="1">
    <tr>
        <td></td>
        <td>1</td>
    </tr>
    <tr>
        <td>2</td>
        <td>3</td>
    </tr>
</table>
</body>
</html>

Upvotes: 3

Views: 54

Answers (1)

John
John

Reputation: 425

CSS:

table tr:first-child td:first-child{
  border: 0px;
}

Or:

table tr:nth-child(1) td:nth-child(1){
  border: 0px;
}

Try this. Hope it works

Upvotes: 4

Related Questions