We would like to know how to limit HTML table width to 95% of the screen width.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
table {<!--from ww w . j av a2 s . c om-->
width: 95%;
border-collapse: collapse;
}
td {
background: red;
}
</style>
</head>
<body>
<table>
<tr>
<td>test</td>
</tr>
</table>
</body>
</html>
The code above is rendered as follows: