html - HTML: Inline block doesn't work for just one table
问题描述
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
解决方案
你为什么要内联?我建议在桌子上使用 float:right
推荐阅读
- ios - 组合布局IOS 13组背景颜色
- tensorflow - 具有动态维度的 TensorFlow 占位符实例
- javascript - 自我 XSS 与反射 XSS
- java - Eclipse 无法从 Jar 加载类
- ckeditor5 - 使用在线构建生成器时,CKEditor5 工具栏未在 Angular 中显示
- gcc - ARM、VFP、浮点、惰性上下文切换
- arrays - Angular ngFor连续显示两个项目
- video-streaming - 通过 Wifi 流式传输 GoPro Hero 8 最有效的 gstreamer 管道是什么?
- node.js - 如何使用 jest 模拟 knex 承诺
- html - 创建具有 3 个对角线图像的 HTML,并带有相应的文本