Borde en tbody y td?

I have a table with a number of tbody's to group rows. I want border on each td to make a grid, but I also want border on the surrounding tbody to show that they are grouped. Is that possible?

preguntado el 31 de julio de 12 a las 15:07

3 Respuestas

Parece que la border propiedad en el tds is simply applied on top of the tbody's one :)

If you add at least 2px, not one - it will work. ( - in this example - it's 3px.) I have tested this fiddle in all modern browsers. It works everywhere from IE8 on. As for IE7 - I'd not pay attention ;)

Respondido 31 Jul 12, 16:07

td { 
    border: 1px solid blue;

tbody {
    border: 2px solid red; 

Respondido 31 Jul 12, 15:07

JS Fiddle. See

<table width="300">
            <th width="60" align="center" valign="top" scope="col">Type</th>
            <th width="200" align="left" valign="top" scope="col">Address</th>
            <td align="center" valign="top">Shipping</td>
            <td align="left" valign="top">123 Main St</td>

Full browser and device support is not guaranteed.

Respondido 31 Jul 12, 15:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.