[新着] Webテンプレートを仮オープンしました
td, th {
padding: 10px;
}
| padding | パディングの大きさを指定します |
|---|
パディングの大きさは、数値+単位(px、他)か %(割合)、auto(自動)で指定します。
【指定方法】
padding: 2px; … [上下左右] を指定
padding: 2px 4px; … [上下] と [左右] を指定
padding: 2px 4px 6px; … [上] と [左右] と [下] を指定
padding: 2px 4px 6px 8px; … [上] と [右] と [下] と [左] を指定
上記例のように、4タイプの指定方法があります。
それぞれの値は、半角スペースで区切って記述します。
上記の他、上下左右を個別に指定する方法もあります。
詳しくは、ボックスカテゴリーの「上下左右のパディングを個別に指定する」をご覧ください。
<html>
<head>
<title>TAG index Webサイト</title>
<style type="text/css">
<!--
table, th, td { border: 2px #2b2b2b solid; }
th, td { padding: 30px; }
-->
</style>
</head>
<body>
<table>
<tr>
<th>サーバー業者</th>
<th>Web制作業者</th>
<th>SEO業者</th>
</tr>
<tr>
<td>サーバーA社</td>
<td>Web制作A社</td>
<td>SEO A社</td>
</tr>
</table>
</body>
</html>
▼これをブラウザで見ると次のように表示されます
| サーバー業者 | Web制作業者 | SEO業者 |
|---|---|---|
| サーバーA社 | Web制作A社 | SEO A社 |