Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

table alignment, better implementation

  • Loading branch information...
commit 7221ba4931c456bf83c58a54ea44f142ac552234 1 parent 7e9ebd6
@stubbornella authored
Showing with 11 additions and 11 deletions.
  1. +6 −6 core/table/table.css
  2. +5 −5 core/table/table.html
View
12 core/table/table.css
@@ -8,11 +8,11 @@
.data table {width:100%; table-layout:fixed;}
th, td{/*vertical-align:top;*/}
/* horizontal alignment */
-.txtC, .txtC td, .txtC th, .data .txtC th, .data .txtC td{text-align:center;}
-.txtL, .txtL td, .txtL th, .data .txtL th, .data .txtL td{text-align:left;}
-.txtR, .txtR td, .txtR th, .data .txtR th, .data .txtR td{text-align:right;}
+.txtC, table .txtC, table tr .txtC{text-align:center;}
+.txtL, table .txtL, table tr .txtL{text-align:left;}
+.txtR, table .txtR, table tr .txtR{text-align:right;}
/* vertical alignment */
-.txtT, .txtT td, .txtT th, .data .txtT th, .data .txtT td{vertical-align:top;}
-.txtB, .txtB td, .txtB th, .data .txtB th, .data .txtB td{vertical-align:bottom;}
-.txtM, .txtM td, .txtM th, .data .txtM th, .data .txtM td{vertical-align:middle;}
+.txtT, table .txtT, table tr .txtT{vertical-align:top;}
+.txtB, table .txtB, table tr .txtB{vertical-align:bottom;}
+.txtM, table .txtM, table tr .txtM{vertical-align:middle;}
.data th,.data td{padding:3px 20px}
View
10 core/table/table.html
@@ -11,17 +11,17 @@
<div class="body">
<h1>Table</h1>
<div class="data simpleTable">
- <table>
+ <table class="txtL">
<tr>
- <th scope="col">error</th>
+ <th scope="col">This table should align left</th>
<th scope="col">type</th>
<th scope="col">browsers</th>
<th scope="col">message</th>
<th scope="col">line</th>
</tr>
- <tr>
- <td>35</td>
- <td>broken box model</td>
+ <tr class="txtC">
+ <td>This row should align Center</td>
+ <td class="txtR">This cell should align right</td>
<td>FF, Safari, Opera</td>
<td>Don't declare width and either padding or borders on the same element.</td>
<td>3</td>
Please sign in to comment.
Something went wrong with that request. Please try again.