Simple Table with Striped Rows
Example
Copy the following simple table code to your page and add or delete rows and columns as necesssary:
||~ Heading ||~ Heading ||~ Heading ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
The result will be a table with alternate colored (striped) rows:
Heading | Heading | Heading |
---|---|---|
cell content | cell content | cell content |
cell content | cell content | cell content |
cell content | cell content | cell content |
cell content | cell content | cell content |
cell content | cell content | cell content |
cell content | cell content | cell content |
Code
[[module css]]
table.wiki-content-table {
border-collapse: collapse;
border-spacing: 0;
margin: 0;
}
table.wiki-content-table th {
background-color: #666;
border: 1px solid #888888;
color: #fff;
padding: 0.3em 0.7em;
text-align: left;
}
table.wiki-content-table tr {
background-color: #FFFFFF;
border: 1px solid darkgray;
}
table.wiki-content-table tr:nth-child(2n+1) {
background-color: #EEEEEE;
}
table.wiki-content-table td {
border: medium none;
color: #666666;
font-size: 85%;
padding: 0.3em 0.7em;
text-align: left;
}
[[/module]]
Copy the following simple table code to your page and add or delete rows and columns as necesssary:
[[code]]
||~ Heading ||~ Heading ||~ Heading ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
[[/code]]
The result will be a table with alternate colored (striped) rows:
||~ Heading ||~ Heading ||~ Heading ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
|| cell content || cell content || cell content ||
Use as Include File
To use the above INCL file, please include the following line into your code:
[[include :incl:code-block:5]]