Alternating Colors of Rows in Tables

Discuss the development and implementation of Joomla! 1.0.x templates here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Locked
DreamWeb
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Mon Mar 13, 2006 5:15 am

Alternating Colors of Rows in Tables

Post by DreamWeb » Fri Mar 16, 2007 3:44 pm

Hey Guys!

My website has quite a few tables setup.  I'm just wondering if there is a way to spice them up a little through CSS?

Can I apply an ID/Style to a table that will allow me to automatically alternate the color of each row?

Can you provide an example?  I only half know what I'm talking about :)

Thanks!

david

technopuzzle
Joomla! Ace
Joomla! Ace
Posts: 1958
Joined: Thu Aug 18, 2005 5:53 pm
Location: Washington D.C. & Baltimore, MD Metro
Contact:

Re: Alternating Colors of Rows in Tables

Post by technopuzzle » Sat Mar 17, 2007 6:37 am

Try using this

Code: Select all

/*Alternating table rows*/
tr.sectiontableentry1 td,td.sectiontableentry1 {
padding: 4px;background-color: #F8F8F8;font-size:90%;color:#000;}
tr.sectiontableentry1:hover td,td.sectiontableentry1 {
padding: 4px;background-color: #BFBFBF;font-size:90%;color:#000;}
tr.sectiontableentry2 td ,td.sectiontableentry2{
padding: 4px;background-color: #EFEFEF;font-size:90%;color:#000;}
tr.sectiontableentry2:hover td ,td.sectiontableentry2{
padding: 4px;background-color: #BFBFBF;font-size:90%;color:#000;}
Thanks,
Roger Raymond
Techno Puzzle

DreamWeb
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Mon Mar 13, 2006 5:15 am

Re: Alternating Colors of Rows in Tables

Post by DreamWeb » Mon Mar 19, 2007 2:24 pm

I tried adding this to my CSS and it had no effect.  I may be doing something wrong?  Do I need to specify anything in my content?

Thanks!

.david

technopuzzle
Joomla! Ace
Joomla! Ace
Posts: 1958
Joined: Thu Aug 18, 2005 5:53 pm
Location: Washington D.C. & Baltimore, MD Metro
Contact:

Re: Alternating Colors of Rows in Tables

Post by technopuzzle » Sat Apr 07, 2007 12:08 am

Sorry for the delay.

You'll need to assign your table / table rows with the CSS classes listed above.
Thanks,
Roger Raymond
Techno Puzzle

dpaiva001
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Mar 04, 2011 8:47 pm

Re: Alternating Colors of Rows in Tables

Post by dpaiva001 » Fri Mar 04, 2011 8:51 pm

Where do I add the css you listed above?

Thanks.

technopuzzle
Joomla! Ace
Joomla! Ace
Posts: 1958
Joined: Thu Aug 18, 2005 5:53 pm
Location: Washington D.C. & Baltimore, MD Metro
Contact:

Re: Alternating Colors of Rows in Tables

Post by technopuzzle » Fri Mar 04, 2011 11:20 pm

You need to add it to your templates CSS file.
dpaiva001 wrote:Where do I add the css you listed above?
Thanks,
Roger Raymond
Techno Puzzle


Locked

Return to “Templates & CSS - 1.0.x”