![]() |
| |||||||
| Support (Version 2) Here is where we provide limited support for version 2. If you are seeking support for version 3 please post in the phpLD 3.0 Support Forum. |
![]() |
| | Thread Tools | Display Modes |
| | #1 |
| Join Date: Feb 2006 Posts: 6 | It is possible to add alternating row colors to links listing page? |
| |
| | #2 | |
| Supporter Moderator Join Date: Dec 2005 Location: Cluj-Napoca/Sighisoara (Romania) Posts: 4,468 | Quote:
Go to your "link.tpl" file, and find: Code: <table><tr>
{* show page rank *}
{if $smarty.const.SHOW_PAGERANK}
... Code: <table class="{cycle values="odd,even"}"><tr>
{* show page rank *}
{if $smarty.const.SHOW_PAGERANK}
... Code: .even {
background:#fff;
}
.odd {
background:#fcfaf6;
} Boby __________________ wanna say thank you?
| |
| |
| | #3 |
| Join Date: Feb 2006 Posts: 6 | Tnq for your fast reply It's working 8)Mai pe romaneste - ms pentru ajutor |
| |
| | #4 | |||||
| Join Date: Apr 2007 Posts: 47 | Okay, I'm at wits end here. This should be so-o-o simple. The background color is not showing up in alternate the alternate tables. I've added this to my main.css file in templates/Default/style Quote:
Quote:
Quote:
So I looked up background color in CSS. Well, for the span property, it is written a bit differently (can't find an example for table background colors in CSS in my book). So I tried this: Quote:
My CSS file is the default CSS file. This is driving me totally nuts. Since everything else works, why doesn't my alternating background color show up? So in desperation, I tried making the background color black. Quote:
Choose a different color for the background than #F8F8FC !! (It is too white to show a difference against white backgrounds.) **goes off to take some aspirin** | |||||
| |
| | #5 |
| Join Date: May 2007 Posts: 63 | How would you do this if you converted the table into a div? My current code shows: <div style="padding:5px; margin:5px; border-top-style: dotted; height:200px; border-top-color: #CCCCCC; border-top-width: 1px; cycle values dd,even;">You can see that I tried adding it like the above but dont know the css for this....... |
| |
| | #6 |
| Join Date: May 2007 Posts: 157 | Thank you for this worked out great __________________ MySpace Proxy oOoOo YouTube Proxy Last edited by Mr_Bill; 08-27-2007 at 08:45 PM. |
| |
| | #7 | |
| Join Date: Nov 2006 Posts: 10 | Quote:
Code: <div class="{cycle values="odd,even"}" style="padding:5px; margin:5px; border-top-style: dotted; height:200px; border-top-color: #CCCCCC; border-top-width: 1px;"> | |
| |
| | #8 |
| Join Date: Aug 2007 Posts: 92 | And what if the <div> is allready styled through the main.css with a class, like <div class="something">? |
| |
| | #9 |
| Supporter Moderator Join Date: Dec 2005 Location: Cluj-Napoca/Sighisoara (Romania) Posts: 4,468 | You can assign more classes to an HTML element: Code: <div class="class1 class2 class3 class4"> Code: <div class="class1 class2 class3 {cycle values="odd,even"}"> You can now style the element in your CSS file by using one of the assigned classes. If you have a custom styling set for let's say "class1" and now your HTML element has also "odd" or "even" assigned, you can override the settings with: Code: body .even {
background:#fff;
}
body .odd {
background:#fcfaf6;
} (bad IE)Code: .myclass {
background:#ff0000 !important;
} __________________ wanna say thank you?
|
| |
| | #10 |
| Join Date: Aug 2007 Posts: 92 | Thanks Boby, What I did was remove the original class from the div and give it the class="{cycle values="odd,even"}. In my .css I added the original properties to .even and .odd. Apparently that works nicely, if I discover any issues later on I´ll restyle using several classes in the same div. I didn´t know that I can apply more than one class to one element. |
| |
| | #11 | |
| Supporter Moderator Join Date: Dec 2005 Location: Cluj-Napoca/Sighisoara (Romania) Posts: 4,468 | Quote:
Code: .odd, .even {
/* add here common rules that both classes share (margin, padding, text-align, etc)*/
}
.odd {
/* rules that apply only to class "odd" */
}
.even {
/* rules that apply only to class "even" */
} __________________ wanna say thank you?
| |
| |
| | #12 |
| Join Date: Aug 2007 Posts: 92 | I see, That works nicely, just applied this. Thanks again and greetings. |
| |
| | #13 |
| Supporter Join Date: Dec 2005 Location: www.dynn.org Posts: 180 | do you have demo for this? __________________ |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|