Skip to content

Commit

Permalink
clean up sample css
Browse files Browse the repository at this point in the history
  • Loading branch information
jmosbech committed Apr 5, 2014
1 parent b948cf0 commit beff52a
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 64 deletions.
121 changes: 62 additions & 59 deletions demo/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,115 +1,114 @@
body
{
body {
margin: 0 auto;
padding: 0 20px;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #555;
}
table
{

table {
border: 0;
padding: 0;
margin: 0 0 20px 0;
border-collapse: collapse;
}
th
{

th {
padding: 5px; /* NOTE: th padding must be set explicitly in order to support IE */
text-align: left;
text-transform: uppercase;
line-height: 2em;
color: #FFF;
background-color: #555;
}
.amount
{
text-align: right;
padding-right: 10px;
}
tbody td
{

tbody td {
padding: 5px 5px 20px 5px;
line-height: 18px;
border-top: 1px solid #E0E0E0;
}
tbody tr:nth-child(2n)
{

tbody tr:nth-child(2n) {
background-color: #F7F7F7;
opacity: 0.8;
}
tbody tr:hover
{

tbody tr:hover {
background-color: #EEEEEE;
}
.stock th
{

.amount {
text-align: right;
padding-right: 10px;
}

.stock th {
background-color: rgb(252, 110, 15);
background-color: rgba(252, 110, 15, 0.8);
text-transform: none;
text-align: center;
padding: 10px;
}
.stock th, .stock td
{

.stock th, .stock td {
text-align: center;
padding: 5px 20px;
}
.stock td:first-child, .stock th:first-child
{

.stock td:first-child, .stock th:first-child {
text-align: left;
font-weight: normal;
}
.nasdaq th
{

.nasdaq th {
text-transform: none;
font-weight: bold;
text-align: center;
}
.nasdaq th, .nasdaq td
{

.nasdaq th, .nasdaq td {
padding: 6px 5px;
font-size: 8pt;
}
.nasdaq td
{

.nasdaq td {
text-align: right;
}
.nasdaq td:first-child, .nasdaq th:first-child
{

.nasdaq td:first-child, .nasdaq th:first-child {
text-align: left;
}
.uci th, .uci td
{

.uci th, .uci td {
font: 10px verdana;
}
.uci th
{

.uci th {
color: #7D7D7D;
background-color: #E5E5E5;
text-transform: none;
font-weight: bold;
}
.uci .age
{

.uci .age {
text-align: center;
}
.uci .result
{

.uci .result {
text-align: right;
}


body.fixed_header, body.scrollable-block
{
body.fixed-header,
body.scrollable-block {
padding: 70px 20px;
}

body.scrollable-block {
min-width: 1000px;
min-width: 1000px;
}

body.fixed_header .header, body.scrollable-block .header
{
body.fixed-header .header,
body.scrollable-block .header {
position: fixed;
top: 0;
color: #FFC234;
Expand All @@ -119,23 +118,27 @@ body.fixed_header .header, body.scrollable-block .header
padding: 0 20px;
border-bottom: 10px solid red;
}
body.fixed_header .header {

body.fixed-header .header {
background: #080808;
}

body.scrollable-block .header {
background: #606;
background: #606;
}

body.scrollable-block table {
width: 90%;
}
.scrollable_area {
margin: 5em auto 0 auto;
width: 80%;
height: 30em;
border: 2px solid #FFC234;
padding: 0 20px 20px 20px;
overflow: auto;
-webkit-box-shadow: 2px 2px 10px rgba(50, 50, 50, 0.9);
-moz-box-shadow: 2px 2px 10px rgba(50, 50, 50, 0.9);
box-shadow: 2px 2px 10px rgba(50, 50, 50, 0.9);
width: 90%;
}

.scrollable-area {
margin: 5em auto 0 auto;
width: 80%;
height: 30em;
border: 2px solid #FFC234;
padding: 0 20px 20px 20px;
overflow: auto;
-webkit-box-shadow: 2px 2px 10px rgba(50, 50, 50, 0.9);
-moz-box-shadow: 2px 2px 10px rgba(50, 50, 50, 0.9);
box-shadow: 2px 2px 10px rgba(50, 50, 50, 0.9);
}
2 changes: 1 addition & 1 deletion demo/offset.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="stylesheet" media="all" href="css/oocss.css" type="text/css">
<link rel="stylesheet" media="all" href="css/custom.css" type="text/css">
</head>
<body class="fixed_header">
<body class="fixed-header">
<div class="header">
<h1>
Demo: Using StickyTableHeaders with an offset element
Expand Down
8 changes: 4 additions & 4 deletions demo/scrollable-div.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1>
<button type="button" class="apply">Apply on first table</button>
</h1>
</div>
<div class="scrollable_area">
<div class="scrollable-area">
<h2>
Results - Cycling - Road 2011
</h2>
Expand Down Expand Up @@ -2520,21 +2520,21 @@ <h3>
<div style="height: 4000px">
lots of content down here...
</div>
</div><!-- .scrollable_area -->
</div><!-- .scrollable-area -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js/jquery.stickytableheaders.js"></script>
<script>

$(document).ready(function () {
// passing a fixedOffset param will cause the table header to stick to the bottom of this element
$("table").stickyTableHeaders({ scrollableArea: $(".scrollable_area")[0], "fixedOffset": 2 });
$("table").stickyTableHeaders({ scrollableArea: $(".scrollable-area")[0], "fixedOffset": 2 });

$('.destroy').on('click', function(e){
$(".first table").stickyTableHeaders('destroy');
});

$('.apply').on('click', function(e){
$('.first table').stickyTableHeaders({ scrollableArea: $(".scrollable_area")[0], "fixedOffset": 2 });
$('.first table').stickyTableHeaders({ scrollableArea: $(".scrollable-area")[0], "fixedOffset": 2 });
});
});

Expand Down

0 comments on commit beff52a

Please sign in to comment.