table width: 95%; : table size « Tags « HTML / CSS






table width: 95%;

     
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Spotlight  | A Free CSS Template by RamblingSoul</title>
<style type='text/css'>
table {
  width: 95%;
  background:red;
  border: 1px solid #C5B798;
  margin-top: 15px;
  margin-bottom: 25px;
}
td {
  border-bottom: 1px solid #CDC1A7;
  padding: 5px;
}
th {
  font-family: "Trebuchet MS", Arial, Verdana;
  font-size: 14px;
  padding: 5px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: #CDC1A7;
  background-color: #CDC1A7;
  color: #993300;
}
</style>


</head>
<body>
<table cellspacing="0" cellpadding="3">
  <tr>
    <th scope="col">Lorem Ipsum</th>
    <th scope="col">Dolor Sit</th>
    <th scope="col">Lorem</th>

    <th scope="col">Ipsum </th>
    <th scope="col">Dolor</th>
  </tr>
  <tr class="alttr1">
    <th scope="row">ABCD</th>
    <td>Noman's Land</td>
    <td>1989</td>

    <td>1200</td>
    <td>200%</td>
  </tr>
  <tr class="alttr2">
    <th scope="row">XYZ</th>
    <td>Nobody Home</td>
    <td>1941</td>

    <td>120</td>
    <td>50%</td>
  </tr>
<tr class="alttr1">
    <th scope="row">ABCD</th>
    <td>Noman's Land</td>
    <td>1989</td>

    <td>1200</td>
    <td>200%</td>
  </tr>
  <tr class="alttr2">
    <th scope="row">XYZ</th>
    <td>Nobody Home</td>
    <td>1941</td>

    <td>120</td>
    <td>50%</td>
  </tr>
<tr class="alttr1">
    <th scope="row">ABCD</th>
    <td>Noman's Land</td>
    <td>1989</td>

    <td>1200</td>
    <td>200%</td>
  </tr>
  <tr class="alttr2">
    <th scope="row">XYZ</th>
    <td>Nobody Home</td>
    <td>1941</td>

    <td>120</td>
    <td>50%</td>
  </tr>
</table>

</body>
</html>

   
    
    
    
    
  








Related examples in the same category

1.Table body font size
2.Sized Table
3.Sized or Stretched Table
4.Right-offset Sized Table
5.Right-aligned Sized Table
6.Centered Sized Table
7.Left-offset Sized Table
8.tbody td font-size: 120%;
9.'cellpadding' sets the empty width between a cell's border and its content
10.'cellspacing' sets the width of the empty space between cells in a table
11.Table width 200px
12.Set table width, margin and text align
13.A table with auto width only expands enough to accomodate its content
14.table width: 350px;
15.table border-width: 1px;
16.table width:250px;
17.table width: auto;
18.An HTML table with width and float attributes
19.table width: 50%; margin: 0 auto; text-align: left;
20.table with auto width
21.table width: 100%;border: thin solid black;border-spacing: 15px 0;
22.table border-style:solid; border-width:1px; border-color:#666666;
23.table width: 100%;
24.Table width: auto
25.table auto width and height
26.Column Width: percentage, auto and px
27.Shrinkwrapped Table column width
28.table width: 100%
29.Fixed Table with fixed width
30.Adding auto width to a Table
31.Left-offset Shrinkwrapped Table
32.Right-offset Shrinkwrapped Table
33.Indented Stretched Table
34.Stretched Table