Tks, but I don't know why it not work on my app. controllers/default.py ------------------------ mytable = SQLTABLE(...) mytable['_id'] = 'mytable'
views/default/index.html ------------------------ {{extend 'layout.html'}} <script>jQuery("tr:even").css("background-color", "#bbbb00");</ script> <script>jQuery("#mytable tr:odd").css("background-color", "#bbbbff");</ script> {{=mytable}} On Aug 13, 5:20 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > mytable['_id']='mytable' > > <script>jQuery("#mytable tr:odd").css("background-color", "#bbbbff");</ > script> > > will only do your table (mytable). > > On Aug 13, 4:14 am, "Robert O'Connor" <robby.ocon...@gmail.com> wrote: > > > > > Or if the browser supports > > CSS3:http://www.w3.org/TR/css3-selectors/#nth-child-pseudo > > > that works -- but it styles *ALL* tables... be warned :) > > > -Rob > > > On Fri, Aug 13, 2010 at 5:09 AM, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > Add something like this to the view (or the layout): > > > > <script>jQuery("tr:odd").css("background-color", "#bbbbff");</script> > > > > On Aug 13, 4:05 am, dlin <dlin...@gmail.com> wrote: > > >> I want to change the layout of the displayed form which is produced by > > >> SQLTABLE and named as mytable. > > > >> 1 x > > >> 2 a > > >> 3 b > > >> 4 c > > >> 5 d > > >> 6 e > > > >> I wish the odd lines and even lines have different background (in .css > > >> instead of server side operation). > > >> Is there any one here know how to do it? > > > >> I wish the views/default/index.html could be easier like > > > >> {{=mytable}} // this table require odd & even have different > > >> background color. > > >> {{=mytable2}} // this table just use the default table view > > > >> But, I don't understand how to do it, how to fine tune the output > > >> table's width,border with the .css client side tech.