1

I'm REALLY new to html, and I'm trying to create a html set of tables, I am using display : inline block and it works the way I want, to put some tables next to the others... but when I put just one table it doesnt shows the borders of the table. The code is the following:

        table {
               border: 1px solid black;
               border-collapse:collapse;
               display: inline-block;
              }
        h2.headertekst {
               text-align: center;
               color : white;
               font-family: verdana
               }
<!DOCTYPE html>
<html>
<head>
<body bgcolor="#3377ff">
<h2 class = "headertekst">Mis Pokemons Favoritos</h2>
<table bgcolor="#e52b50">
<tr>
<th rowspan="4">
<img src="https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/shiny/1.png">
</th>
<td style="color: white">Nombre: Bulbasaur</td>
</tr>
<tr>
<td style="color: white">Peso: 69</td>
</tr>
<tr>
<td style="color: white">Altura: 10</td>
</tr>  
<tr>
<td style="color: white">Expreriencia Base: 64</td>
</tr>   
</table>
</body>
</html>

and the rest is just the information on the cells

2 Answers2

0

Why are you trying to do it inline? I would suggest using float:right on the tables

0

If you want to add borders inside your tables you have to style td and th elements:

table td, table th {
  border: 1px solid black;
}

Or if you need to add only vertical line:

table td, table th { border-left:1px solid black; }
Arturs Mednis
  • 368
  • 1
  • 3
  • 12