Skip to content

Instantly share code, notes, and snippets.

@madankumarpc
Created July 27, 2012 15:50
Show Gist options
  • Save madankumarpc/3188805 to your computer and use it in GitHub Desktop.
Save madankumarpc/3188805 to your computer and use it in GitHub Desktop.
Css examples for table
<html>
<style>
#ver-minimalist
{
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-
Serif;
font-size: 12px;
margin: 45px;
width: 480px;
text-align: left;
border-collapse: collapse;
}
#ver-minimalist th
{
padding: 8px 2px;
font-weight: normal;
font-size: 14px;
border-bottom: 2px solid #6678b1;
border-right: 30px solid #fff;
border-left: 30px solid #fff;
color: #039;
}
#ver-minimalist td
{
padding: 12px 2px 0px 2px;
border-right: 30px solid #fff;
border-left: 30px solid #fff;
color: #669;
}
</style>
<body>
<table id="ver-minimalist">
<tr>
<th>Item name</th>
<th>Description</th>
<th>Price(Rs.)</th>
</tr>
<tr>
<td>Pentium IV</td>
<td>2.2 Ghz</td>
<td>2000 </td>
</tr>
<tr>
<td>Pentium Core Solo</td>
<td>1.2 Ghz</td>
<td>2000 </td>
</tr>
<tr>
<td>Pentium Core 2 Duo</td>
<td>1.2 Ghz</td>
<td>6000 </td>
</tr>
<tr>
<td>Intel Core i3</td>
<td>2.4 Ghz</td>
<td>8000 </td>
</tr>
</table>
</body>
</html>
<html>
<style>
#hor-minimalist-a
{
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 12px;
background: #fff;
margin: 45px;
width: 480px;
border-collapse: collapse;
text-align: left;
}
#hor-minimalist-a th
{
font-size: 14px;
font-weight: normal;
color: #039;
padding: 10px 8px;
border-bottom: 2px solid #6678b1;
}
#hor-minimalist-a td
{
color: #669;
padding: 9px 8px 0px 8px;
}
#hor-minimalist-a tbody tr:hover td
{
color: #009;
}
</style>
<body>
<table id="hor-minimalist-a">
<tr>
<th>Item name</th>
<th>Description</th>
<th>Price(Rs.)</th>
</tr>
<tr>
<td>Pentium IV</td>
<td>2.2 Ghz</td>
<td>2000 </td>
</tr>
<tr>
<td>Pentium Core Solo</td>
<td>1.2 Ghz</td>
<td>2000 </td>
</tr>
<tr>
<td>Pentium Core 2 Duo</td>
<td>1.2 Ghz</td>
<td>6000 </td>
</tr>
<tr>
<td>Intel Core i3</td>
<td>2.4 Ghz</td>
<td>8000 </td>
</tr>
</table>
</body>
</html>
<html>
<style>
#hor-minimalist-b
{
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 12px;
background: #fff;
margin: 45px;
width: 480px;
border-collapse: collapse;
text-align: left;
}
#hor-minimalist-b th
{
font-size: 14px;
font-weight: normal;
color: #039;
padding: 10px 8px;
border-bottom: 2px solid #6678b1;
}
#hor-minimalist-b td
{
border-bottom: 1px solid #ccc;
color: #669;
padding: 6px 8px;
}
#hor-minimalist-b tbody tr:hover td
{
color: #009;
}
</style>
<body>
<table id="hor-minimalist-b">
<tr>
<th>Item name</th>
<th>Description</th>
<th>Price(Rs.)</th>
</tr>
<tr>
<td>Pentium IV</td>
<td>2.2 Ghz</td>
<td>2000 </td>
</tr>
<tr>
<td>Pentium Core Solo</td>
<td>1.2 Ghz</td>
<td>2000 </td>
</tr>
<tr>
<td>Pentium Core 2 Duo</td>
<td>1.2 Ghz</td>
<td>6000 </td>
</tr>
<tr>
<td>Intel Core i3</td>
<td>2.4 Ghz</td>
<td>8000 </td>
</tr>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment