Philip Rhoades
2013-Feb-13 19:24 UTC
Any Rails + 960gs Gurus here? - zebra striping tables
People, For zebra striping tables on basic Rails apps I have quite happily used: <tr class="<%= cycle(''oddrow'', ''evenrow'') %>"> in the table listing in index.html.erb with table tr.evenrow { background-color: white; } table tr.oddrow { background-color: silver; } in the application style sheet but I can''t get it to work with the 960 Grid System stuff. I have messed around using "tbody" tags and nth-child etc but can''t get anywhere - anyone got any clues? I can''t find any mailing list or other support for 960gs. Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Tom Meinlschmidt
2013-Feb-13 19:26 UTC
Re: Any Rails + 960gs Gurus here? - zebra striping tables
forget this, try http://www.w3.org/Style/Examples/007/evenodd.en.html - so, make your strips with CSS, not with your application tom On Feb 13, 2013, at 20:24 , Philip Rhoades <phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org> wrote:> People, > > For zebra striping tables on basic Rails apps I have quite happily used: > > <tr class="<%= cycle(''oddrow'', ''evenrow'') %>"> > > in the table listing in index.html.erb with > > table tr.evenrow { background-color: white; } > table tr.oddrow { background-color: silver; } > > in the application style sheet but I can''t get it to work with the 960 Grid System stuff. > > I have messed around using "tbody" tags and nth-child etc but can''t get anywhere - anyone got any clues? I can''t find any mailing list or other support for 960gs. > > Thanks, > > Phil. > -- > Philip Rhoades > > GPO Box 3411 > Sydney NSW 2001 > Australia > E-mail: phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. >-- ==============================================================================Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache www.meinlschmidt.com www.maxwellrender.cz ============================================================================== -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Philip Rhoades
2013-Feb-13 19:43 UTC
Re: Any Rails + 960gs Gurus here? - zebra striping tables
Tom, I have tried that (if you read more closely you will see) - that is why I was asking if anyone was familiar with the 960gs - their existing style sheets seem to be blocking whatever I try . . Thanks, Phil. On 2013-02-14 06:26, Tom Meinlschmidt wrote:> forget this, try http://www.w3.org/Style/Examples/007/evenodd.en.html > > - so, make your strips with CSS, not with your application > > tom > > On Feb 13, 2013, at 20:24 , Philip Rhoades <phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org> wrote: > >> People, >> >> For zebra striping tables on basic Rails apps I have quite happily >> used: >> >> <tr class="<%= cycle(''oddrow'', ''evenrow'') %>"> >> >> in the table listing in index.html.erb with >> >> table tr.evenrow { background-color: white; } >> table tr.oddrow { background-color: silver; } >> >> in the application style sheet but I can''t get it to work with the >> 960 Grid System stuff. >> >> I have messed around using "tbody" tags and nth-child etc but can''t >> get anywhere - anyone got any clues? I can''t find any mailing list or >> other support for 960gs. >> >> Thanks, >> >> Phil. >> -- >> Philip Rhoades >> >> GPO Box 3411 >> Sydney NSW 2001 >> Australia >> E-mail: phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Ruby on Rails: Talk" group. >> To unsubscribe from this group and stop receiving emails from it, >> send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to >> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > ==============================================================================> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > > www.meinlschmidt.com www.maxwellrender.cz > ==============================================================================-- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Tom Meinlschmidt
2013-Feb-13 19:58 UTC
Re: Any Rails + 960gs Gurus here? - zebra striping tables
did you check order of your stylesheets? Your stylesheet should be the last one. Use inspector tool and check style property. or add important to your definition eg table.mytable tr:nth-child(even) {background: #CCC !important;} tom On Feb 13, 2013, at 20:43 , Philip Rhoades <phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org> wrote:> Tom, > > I have tried that (if you read more closely you will see) - that is why I was asking if anyone was familiar with the 960gs - their existing style sheets seem to be blocking whatever I try . . > > Thanks, > > Phil. > > > On 2013-02-14 06:26, Tom Meinlschmidt wrote: >> forget this, try http://www.w3.org/Style/Examples/007/evenodd.en.html >> - so, make your strips with CSS, not with your application >> tom >> On Feb 13, 2013, at 20:24 , Philip Rhoades <phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org> wrote: >>> People, >>> For zebra striping tables on basic Rails apps I have quite happily used: >>> <tr class="<%= cycle(''oddrow'', ''evenrow'') %>"> >>> in the table listing in index.html.erb with >>> table tr.evenrow { background-color: white; } >>> table tr.oddrow { background-color: silver; } >>> in the application style sheet but I can''t get it to work with the 960 Grid System stuff. >>> I have messed around using "tbody" tags and nth-child etc but can''t get anywhere - anyone got any clues? I can''t find any mailing list or other support for 960gs. >>> Thanks, >>> Phil. >>> -- >>> Philip Rhoades >>> GPO Box 3411 >>> Sydney NSW 2001 >>> Australia >>> E-mail: phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org >>> -- >>> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. >>> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit https://groups.google.com/groups/opt_out. >> -- >> ==============================================================================>> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache >> www.meinlschmidt.com www.maxwellrender.cz >> ==============================================================================> > -- > Philip Rhoades > > GPO Box 3411 > Sydney NSW 2001 > Australia > E-mail: phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. >-- ==============================================================================Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache www.meinlschmidt.com www.maxwellrender.cz ============================================================================== -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Philip Rhoades
2013-Feb-13 22:26 UTC
Re: Any Rails + 960gs Gurus here? - zebra striping tables
Tom, I put mine last but it didn''t help. However, then I used the inspector tool which eventually led me to a better understanding of the supplied stylesheets - and I realised there was already something there for ODD rows ONLY - I missed it before because I was expecting a mention of both odd and even next to each other - in this case, tr.odd just makes the odd rows have a background of white when normally all the rows will have a background of light grey. Thanks! Phil. On 2013-02-14 06:58, Tom Meinlschmidt wrote:> did you check order of your stylesheets? Your stylesheet should be > the last one. Use inspector tool and check style property. > > or add important to your definition > > eg > > table.mytable tr:nth-child(even) {background: #CCC !important;} > > tom > > On Feb 13, 2013, at 20:43 , Philip Rhoades <phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org> wrote: > >> Tom, >> >> I have tried that (if you read more closely you will see) - that is >> why I was asking if anyone was familiar with the 960gs - their >> existing style sheets seem to be blocking whatever I try . . >> >> Thanks, >> >> Phil. >> >> >> On 2013-02-14 06:26, Tom Meinlschmidt wrote: >>> forget this, try >>> http://www.w3.org/Style/Examples/007/evenodd.en.html >>> - so, make your strips with CSS, not with your application >>> tom >>> On Feb 13, 2013, at 20:24 , Philip Rhoades <phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org> >>> wrote: >>>> People, >>>> For zebra striping tables on basic Rails apps I have quite happily >>>> used: >>>> <tr class="<%= cycle(''oddrow'', ''evenrow'') %>"> >>>> in the table listing in index.html.erb with >>>> table tr.evenrow { background-color: white; } >>>> table tr.oddrow { background-color: silver; } >>>> in the application style sheet but I can''t get it to work with the >>>> 960 Grid System stuff. >>>> I have messed around using "tbody" tags and nth-child etc but can''t >>>> get anywhere - anyone got any clues? I can''t find any mailing list >>>> or other support for 960gs. >>>> Thanks, >>>> Phil. >>>> -- >>>> Philip Rhoades >>>> GPO Box 3411 >>>> Sydney NSW 2001 >>>> Australia >>>> E-mail: phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ruby on Rails: Talk" group. >>>> To unsubscribe from this group and stop receiving emails from it, >>>> send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To post to this group, send email to >>>> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit https://groups.google.com/groups/opt_out. >>> -- >>> ==============================================================================>>> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp >>> Filer/NetCache >>> www.meinlschmidt.com www.maxwellrender.cz >>> ==============================================================================>> >> -- >> Philip Rhoades >> >> GPO Box 3411 >> Sydney NSW 2001 >> Australia >> E-mail: phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Ruby on Rails: Talk" group. >> To unsubscribe from this group and stop receiving emails from it, >> send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to >> rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > ==============================================================================> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > > www.meinlschmidt.com www.maxwellrender.cz > ==============================================================================-- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: phil-8eKeQ+h1VH4pAS55Wn97og@public.gmane.org -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Use twitter-bootstrap and you will forget about it: http://twitter.github.com/bootstrap/base-css.html#tables Just add the needed gems into your Gemfile: gem ''bootstrap-will_paginate'', ''~> 0.0.9'' gem ''bootstrap-datepicker-rails'', ''~> 0.6.37'' gem ''bootstrap-sass'', ''~> 2.2.2.0'' and require bootstrap in your css file (in the very first line: @import "bootstrap"; and you are done. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/EyA2sMPNDdYJ. For more options, visit https://groups.google.com/groups/opt_out.