I need this for a simple one-time project and would like to avoid an extended studying of all these newer methods ...
Am I using CSS correctly in the following code?
My attempt to have different cell widths in the second row is not working. How this must be done to work?
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<style>
table {
height: 100%;
width: 100%;
}
tr.row1 {
height: 40%;
}
tr.row2 {
height: 5%;
}
tr.row3 {
height: 55%;
}
td.colS {
width: 40%;
}
td.colW {
width: 60%;
}
</style>
</head>
<body>
<table>
<tbody>
<tr class="row1">
<td class="colS" style="background-color:red">1</td>
<td class="colW" style="background-color:green">2</td>
</tr>
<tr class="row2">
<td class="colW" style="background-color:green">3</td>
<td class="colS" style="background-color:red">4</td>
</tr>
<tr class="row3">
<td class="colS" style="background-color:red">5</td>
<td class="colW" style="background-color:green">6</td>
</tr>
</tbody>
</table>
</body>
</html>
Add
to CSS in to
like this: