Showing posts with label table. Show all posts
Showing posts with label table. Show all posts

Tuesday, August 4, 2009

Table sort with Searchlogic

Searchlogic comes with a nice rails helper method to assist sorting of your paginated tables

<%= order @search, :by => :created_at, :as => "Created" %>

You don't even have to do anything extra to your controller to get some nice sorting action. Cool!

Thursday, July 30, 2009

Google styling scheme for tables

This is what I implemented after studying the CSS for tables that Google uses.

div.data-table table {
background: white none repeat scroll 0 0;
border-collapse: collapse;
cursor: default;
font-family: arial,helvetica;
font-size: 10pt;
margin: 0;
}

div.data-table table th {
background: #FFFFFF url(title-bg.gif) repeat-x scroll left bottom;
font-weight: bold;
text-align: center;
border: 1px solid #EEE;
padding: 6px;
}

div.data-table table td {
border: 1px solid #EEE;
padding: 2px 3px;
}

div.data-table table td.data-seq {
color: #666;
text-align: right;
}

div.data-table table tr.data-row-1 td {
background: #FAFAFA;
}