José Del Valle
José Del Valle

Reputation: 691

HTML table: second row showing beside the first one, not below

Why is the second row showing inline with the first row and not below like the others? Here's the code:

http://jsfiddle.net/jdelva/9MfGf/4/

<body>
<table id="mitabla" >
    <caption>
        <span class="titulo">Tabla de posiciones campeonato nacional</span>
    </caption>
    <tr class="encabezado">
        <th rowspan="2" colspan="2"> #</th>
        <th rowspan="2" colspan="2"> /\</th>
        <th rowspan="2" colspan="8"> Equipo</th>
        <th rowspan="2" colspan="2"> PJ</th>
        <th rowspan="2" colspan="2"> PG</th>
        <th rowspan="2" colspan="2"> PE</th>
        <th rowspan="2" colspan="2"> PP</th>
        <th rowspan="2" colspan="2"> GF</th>
        <th rowspan="2" colspan="2"> GC</th>
        <th rowspan="2" colspan="2"> DG</th>
        <th rowspan="2" colspan="2"> Pt</th>
    </tr>
    <tr class="equipo">
        <td>1</td>
    </tr>
    <tr class="equipo">
        <td>2</td>
    </tr>
    <tr class="equipo">
        <td>3</td>
    </tr>



</table>
</body>

PS: sorry for the spanish I was too lazy to translate it, but I mean, those words aren't the problem

Upvotes: 0

Views: 700

Answers (2)

Harryman
Harryman

Reputation: 62

Remove your rowspan="2" and your second row is on the right place.

Upvotes: 1

Piyush Kukadiya
Piyush Kukadiya

Reputation: 1890

Try this insert empty row after first row

<body>
<table id="mitabla" >
<caption>
    <span class="titulo">Tabla de posiciones campeonato nacional</span>
</caption>
<tr class="encabezado">
    <th rowspan="2" colspan="2"> #</th>
    <th rowspan="2" colspan="2"> /\</th>
    <th rowspan="2" colspan="8"> Equipo</th>
    <th rowspan="2" colspan="2"> PJ</th>
    <th rowspan="2" colspan="2"> PG</th>
    <th rowspan="2" colspan="2"> PE</th>
    <th rowspan="2" colspan="2"> PP</th>
    <th rowspan="2" colspan="2"> GF</th>
    <th rowspan="2" colspan="2"> GC</th>
    <th rowspan="2" colspan="2"> DG</th>
    <th rowspan="2" colspan="2"> Pt</th>
</tr>
<tr></tr>
<tr class="equipo">
    <td>1</td>
</tr>
<tr class="equipo">
    <td>2</td>
</tr>
<tr class="equipo">
    <td>3</td>
</tr>

Upvotes: 1

Related Questions