Browse files

default styling added that makes the table look not bad.

  • Loading branch information...
1 parent d824bde commit 097f58886b02c6c0fc9786805b11b6e190cc240d @reednj committed Aug 22, 2011
Showing with 31 additions and 1 deletion.
  1. +1 −1 Source/jsTable.js
  2. +21 −0 Source/jstable-default.css
  3. +9 −0 Test/test.html
View
2 Source/jsTable.js
@@ -54,7 +54,7 @@ var jsTable = new Class({
this.element.empty();
$e('table', {
- 'class': 'js-table',
+ 'class': 'jst-table',
'children':[
this.thead = $e('thead', {'children': [$e('tr')]}),
this.tbody = $e('tbody')
View
21 Source/jstable-default.css
@@ -0,0 +1,21 @@
+/*
+ * A nice default theme for jstable.
+ *
+ * Nathan Reed, 2011-08-22
+ */
+
+.jst-table {
+ border-collapse: collapse;
+ border: 1px solid #ccc;
+}
+
+.jst-table thead th {
+ text-align: left;
+ border-bottom: 1px solid #ccc;
+ padding: 3px 8px;
+}
+
+.jst-table tbody td {
+ text-align: left;
+ padding: 3px 8px;
+}
View
9 Test/test.html
@@ -6,9 +6,18 @@
<title> jsTable test </title>
<link rel="stylesheet" href="./css-lib/default.css" type="text/css">
+<link rel="stylesheet" href="../Source/jstable-default.css" type="text/css">
<style type='text/css'>
+#t1 {
+ margin: 32px;
+}
+
+#t1 table {
+ width: 500px;
+}
+
</style>
<script src='./js-lib/mootools-core-1.3.2.js' type='text/javascript'></script>

0 comments on commit 097f588

Please sign in to comment.