On Wednesday, December 7, 2016 at 3:02:10 PM UTC-8, Paolo Caruccio wrote:
>
> Below code should work with bootstrap and stupid.css
>
> <style>
> .table.myeheaders th {padding-right:2em;}
> .table-striped .w2p_odd.odd {background-color:#ddffcc;}
> </style>
>
> {{extend 'layout.html'}}
> <h1>This is the default/sorted.html template</h1>
> {{=SQLTABLE(rows, truncate=30, headers = {'tbl1.a':'Ayy', 'tbl1.b':'Bee', 
> 'tbl1.c':'Cee', 'tbl1.d':'Dee'}, 
>     columns=['tbl1.a', 'tbl1.b', 'tbl1.c', 'tbl1.d'], _class="table 
> table-striped myeheaders")}}
>
>
> Some readings:
>
> https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
> https://developer.mozilla.org/en-US/docs/Web/CSS/Universal_selectors
>
>
>
The table class does interesting things, but not what I want.   That gave 
8px padding on all 4 sides, and the columns divided up the full width.   
Better than the default styling, but I prefer a more compact look.

What I have now is

<style>
.myeheaders th {padding-right:2em;}
.table-striped .w2p_odd.odd {background-color:#ddffcc;}
</style>

{{extend 'layout.html'}}
<h1>This is the default/sorted.html template</h1>
{{=SQLTABLE(rows, truncate=30, headers = {'tbl1.a':'Ayy', 'tbl1.b':'Bee', 
'tbl1.c':'Cee', 'tbl1.d':'Dee'}, 
    columns=['tbl1.a', 'tbl1.b', 'tbl1.c', 'tbl1.d'], _class="table-striped 
myeheaders")}}


 Interesting that that looks like your first post ... I must have missed 
something on the earlier try.

Thanks for your help.

/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to