View Single Post
Old 04-23-2022, 11:24 AM   #2
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
FWIW, I've always found Tables to be tricky so I made my CSS as simple as i could

Sometimes inline CSS and sometimes CSS classes

Here's just my example for both, with

<td style="width: 35%">

the inline and

<td class="second">2</td>

the clsss


Spoiler:
table {
width: 60%;
margin-left: 15%;
margin-right: 15%;
text-align: center;
border: 3px solid black;
border-collapse: collapse;
}

th {
font-style:italic;
height:3em;
vertical-align: middle;
padding:5px;
border-bottom: 3px solid black;
}

tr {
margin-top:1em;
margin-bottom: 1em;
height:2em;
}

td {
padding:5px;
border-bottom: 1px solid black;
}

td.first, td.second {
width: 15%;
}

td.third {
width: 25%;
}



Using


Spoiler:
<table>
<thead>
<tr>
<th colspan="3">FIRST ROW</th>
</tr>
</thead>

<tbody>
<tr>
<td style="width: 35%">1</td>

<td class="second">2</td>

<td class="third">3</td>
</tr>

<tr>
<td>4</td>

<td>5</td>

<td>6</td>
</tr>

<tr>
<td>7</td>

<td>8</td>

<td>9</td>
</tr>

<tr>
<td>10</td>

<td>11</td>

<td>12</td>
</tr>
</tbody>
</table>



Just some things to consider
Attached Files
File Type: epub Table3.epub (2.3 KB, 105 views)
phossler is offline   Reply With Quote