Jennifer
06-05-2013, 10:02 AM
Hello, Many people are looking for such css code for making fancy tables elements on their sites. I have found some good looking fancy css style code for them.
Here is a css code for making fancy stylish tables.
https://lh4.googleusercontent.com/-Pi4bDp3F9iU/Ua8MULxw-iI/AAAAAAAAABM/K2VVztjxrVI/s231/fancy%2520css%2520table%2520style%25203%2520screen shot.jpg
table {
border-collapse: collapse;
border-spacing: 0;
border: 1px solid #FBF9FB;
margin: 10px 0;
}
table td,table th {
text-align: left;
border: 1px solid #E4E4E4;
}
table th {
background: #F9F9F9;
color: #999;
font-weight: 400;
border: 1px solid #F3F3F3;
}
table td {
border: 1px solid #F3F3F3;
background: #F9F9F9;
color: #555;
}
table tr:hover td {
background: #F8F3FC;
border: 1px solid #FBF9FB;
}
https://lh5.googleusercontent.com/-i-Z99OUZ1n4/Ua8MUu9TkFI/AAAAAAAAABU/CL9lSONVKcs/s490/fancy%2520css%2520table%2520style%25202%2520screen shot.jpg
Another css style code is..
table { width:98%;background: rgba(238, 238, 238, 0.9);-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 0 10px rgba(0, 0, 0, 0.1) inset, 0 1px 2px rgba(0, 0, 0, 0.1) !important;-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 0 10px rgba(0, 0, 0, 0.1) inset, 0 1px 2px rgba(0, 0, 0, 0.1) !important;-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 0 10px rgba(0, 0, 0, 0.1) inset, 0 1px 2px rgba(0, 0, 0, 0.1) !important;box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 0 10px rgba(0, 0, 0, 0.1) inset, 0 1px 2px rgba(0, 0, 0, 0.1) !important;border:1px solid #ccc;border-bottom:0;margin-bottom:15px;border-spacing: 0; line-height: 18px; margin: 0 0 22px 0; text-align: left; }
th, td { font-size:14px;padding: 8px 11px; border-top:1px solid rgba(255, 255, 255, 0.6);border-bottom:1px solid rgba(0, 0, 0, 0.1);}
thead, thead th, thead td {padding:10px 11px;font-weight:bold;background:rgba(0,0,0,.05);color:#111; text-shadow:0 1px 0px #fff;font-size:13px;}
Above 2 codes are for class table , and these will effect all tables of your site/blog. if you want to make separate class then make specific class like below.
CSS code you'll need, preferably in a separate file:
https://lh4.googleusercontent.com/-Gxh1_c9RvK4/Ua8MUyNp0TI/AAAAAAAAABY/rZYXbTxdV-A/s495/css%2520table%2520style%2520screenshot.jpg
table.fancy {
margin: 1em 1em 1em 0;
background: whitesmoke;
border-collapse: collapse;
}
table.fancy th, table.fancy td {
border: 1px silver gainsboro;
padding: 0.2em;
}
table.fancy th {
background: gainsboro;
text-align: left;
}
table.fancy tr:hover td {
background: mintcream !important;
}
table.fancy caption {
margin-left: inherit;
margin-right: inherit;
}
The HTML code is very simple with "fancy" being the only class declaration:
<table class="fancy">
<tr>
<th>Key</th><th>Value</th>
</tr>
<tr>
<td>ACT</td><td>Australian Capital Territory</td>
</tr>
<tr>
<td>NSW</td><td>New South Wales</td>
</tr>
<tr>
<td>NT</td><td>Northern Territory</td>
</tr>
<tr>
<td>QLD</td><td>Queensland</td>
</tr>
<tr>
<td>SA</td><td>South Australia</td>
</tr>
<tr>
<td>TAS</td><td>Tasmania</td>
</tr>
<tr>
<td>VIC</td><td>Victoria</td>
</tr>
<tr>
<td>WA</td><td>Western Australia</td>
</tr>
</table>
Here is a css code for making fancy stylish tables.
https://lh4.googleusercontent.com/-Pi4bDp3F9iU/Ua8MULxw-iI/AAAAAAAAABM/K2VVztjxrVI/s231/fancy%2520css%2520table%2520style%25203%2520screen shot.jpg
table {
border-collapse: collapse;
border-spacing: 0;
border: 1px solid #FBF9FB;
margin: 10px 0;
}
table td,table th {
text-align: left;
border: 1px solid #E4E4E4;
}
table th {
background: #F9F9F9;
color: #999;
font-weight: 400;
border: 1px solid #F3F3F3;
}
table td {
border: 1px solid #F3F3F3;
background: #F9F9F9;
color: #555;
}
table tr:hover td {
background: #F8F3FC;
border: 1px solid #FBF9FB;
}
https://lh5.googleusercontent.com/-i-Z99OUZ1n4/Ua8MUu9TkFI/AAAAAAAAABU/CL9lSONVKcs/s490/fancy%2520css%2520table%2520style%25202%2520screen shot.jpg
Another css style code is..
table { width:98%;background: rgba(238, 238, 238, 0.9);-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 0 10px rgba(0, 0, 0, 0.1) inset, 0 1px 2px rgba(0, 0, 0, 0.1) !important;-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 0 10px rgba(0, 0, 0, 0.1) inset, 0 1px 2px rgba(0, 0, 0, 0.1) !important;-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 0 10px rgba(0, 0, 0, 0.1) inset, 0 1px 2px rgba(0, 0, 0, 0.1) !important;box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 0 10px rgba(0, 0, 0, 0.1) inset, 0 1px 2px rgba(0, 0, 0, 0.1) !important;border:1px solid #ccc;border-bottom:0;margin-bottom:15px;border-spacing: 0; line-height: 18px; margin: 0 0 22px 0; text-align: left; }
th, td { font-size:14px;padding: 8px 11px; border-top:1px solid rgba(255, 255, 255, 0.6);border-bottom:1px solid rgba(0, 0, 0, 0.1);}
thead, thead th, thead td {padding:10px 11px;font-weight:bold;background:rgba(0,0,0,.05);color:#111; text-shadow:0 1px 0px #fff;font-size:13px;}
Above 2 codes are for class table , and these will effect all tables of your site/blog. if you want to make separate class then make specific class like below.
CSS code you'll need, preferably in a separate file:
https://lh4.googleusercontent.com/-Gxh1_c9RvK4/Ua8MUyNp0TI/AAAAAAAAABY/rZYXbTxdV-A/s495/css%2520table%2520style%2520screenshot.jpg
table.fancy {
margin: 1em 1em 1em 0;
background: whitesmoke;
border-collapse: collapse;
}
table.fancy th, table.fancy td {
border: 1px silver gainsboro;
padding: 0.2em;
}
table.fancy th {
background: gainsboro;
text-align: left;
}
table.fancy tr:hover td {
background: mintcream !important;
}
table.fancy caption {
margin-left: inherit;
margin-right: inherit;
}
The HTML code is very simple with "fancy" being the only class declaration:
<table class="fancy">
<tr>
<th>Key</th><th>Value</th>
</tr>
<tr>
<td>ACT</td><td>Australian Capital Territory</td>
</tr>
<tr>
<td>NSW</td><td>New South Wales</td>
</tr>
<tr>
<td>NT</td><td>Northern Territory</td>
</tr>
<tr>
<td>QLD</td><td>Queensland</td>
</tr>
<tr>
<td>SA</td><td>South Australia</td>
</tr>
<tr>
<td>TAS</td><td>Tasmania</td>
</tr>
<tr>
<td>VIC</td><td>Victoria</td>
</tr>
<tr>
<td>WA</td><td>Western Australia</td>
</tr>
</table>