Go Back   PHP Link Directory Forum > PHP Link Directory (phpLD) > Support (Version 2)

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.

Closed Thread
 
topic widgets
Old 02-14-2006   #1
BoInG
 
Join Date: Feb 2006
Posts: 6
Default Alternating row colors

It is possible to add alternating row colors to links listing page?
BoInG is offline  
Old 02-14-2006   #2
Boby
Supporter
Moderator
 
Boby's Avatar
 
Join Date: Dec 2005
Location: Cluj-Napoca/Sighisoara (Romania)
Posts: 4,524
Default Re: Alternating row colors

Code:
Content visible to registered users only.
Sure!

Go to your "link.tpl" file, and find:
Code:
Content visible to registered users only.
Edit the table tag like this one:
Code:
Content visible to registered users only.
And add to your CSS file (default is main.css)
Code:
Content visible to registered users only.
Or whatever you like.

Boby
__________________
Please do *not* contact me for support on phpLD!! I can hardly find time to give support for my own mods, for anything else I won't.
  • My phpLD Mods
  • I am *not* a phpLD staff member, so please do *not* ask me to grant permissions, sales stuff, for access to the private supporter forums or phpLD download area.
  • Before you report your problems, make sure it happens with the *default* package and not your highly modified code. Don't forget to use the search feature and do not *bump* threads to soon (allow at least 24h).
Boby is offline  
Old 02-15-2006   #3
BoInG
 
Join Date: Feb 2006
Posts: 6
Default

Tnq for your fast reply It's working 8)

Mai pe romaneste - ms pentru ajutor
BoInG is offline  
Old 04-11-2007   #4
lostndazed
 
Join Date: Apr 2007
Posts: 48
Default

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

Code:
Content visible to registered users only.
And to isolate the problem, I created a testCSS.htm page. Here's the code:
Code:
Content visible to registered users only.
Couldn't get that to work, but I could see that the text had been formatted, probably arial size 10 or so. So to test further, I modified this code in the css file:

Code:
Content visible to registered users only.
The text is a large red font, but no background color.
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:

Code:
Content visible to registered users only.
The text became black and shrunk back down. But the background still looks white.

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.

Code:
Content visible to registered users only.
Guess what? That works. So here's my lesson to others.

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**
lostndazed is offline  
Old 05-21-2007   #5
searchangle
 
Join Date: May 2007
Posts: 63
Default css?

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 valuesdd,even;">

You can see that I tried adding it like the above but dont know the css for this.......
searchangle is offline  
Old 08-27-2007   #6
Mr_Bill
Supporter
 
Join Date: May 2007
Posts: 159
Default

Thank you for this worked out great

Last edited by Mr_Bill; 08-27-2007 at 07:45 PM.
Mr_Bill is offline  
Old 08-27-2007   #7
pnoden
 
Join Date: Nov 2006
Posts: 10
Default

Code:
Content visible to registered users only.
You would need to add the class="{cycle values="odd,even"}" to the div like this:
Code:
Content visible to registered users only.
Then add the classes .odd and .even to your CSS file.
pnoden is offline  
Old 08-27-2007   #8
Willy
Supporter
 
Join Date: Aug 2007
Posts: 94
Default

And what if the <div> is allready styled through the main.css with a class, like <div class="something">?
Willy is offline  
Old 08-29-2007   #9
Boby
Supporter
Moderator
 
Boby's Avatar
 
Join Date: Dec 2005
Location: Cluj-Napoca/Sighisoara (Romania)
Posts: 4,524
Default

You can assign more classes to an HTML element:
Code:
Content visible to registered users only.
Code:
Content visible to registered users only.
This DIV would now have the classes "class1", "class2", "class3" and "odd" OR "even" assigned.

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:
Content visible to registered users only.
You can also use "!important" but probably IE will ignore it (bad IE)
Code:
Content visible to registered users only.
__________________
Please do *not* contact me for support on phpLD!! I can hardly find time to give support for my own mods, for anything else I won't.
  • My phpLD Mods
  • I am *not* a phpLD staff member, so please do *not* ask me to grant permissions, sales stuff, for access to the private supporter forums or phpLD download area.
  • Before you report your problems, make sure it happens with the *default* package and not your highly modified code. Don't forget to use the search feature and do not *bump* threads to soon (allow at least 24h).
Boby is offline  
Old 08-29-2007   #10
Willy
Supporter
 
Join Date: Aug 2007
Posts: 94
Default

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.
Willy is offline  
Old 08-29-2007   #11
Boby
Supporter
Moderator
 
Boby's Avatar
 
Join Date: Dec 2005
Location: Cluj-Napoca/Sighisoara (Romania)
Posts: 4,524
Default

Code:
Content visible to registered users only.
You can here combine the rules:
Code:
Content visible to registered users only.
__________________
Please do *not* contact me for support on phpLD!! I can hardly find time to give support for my own mods, for anything else I won't.
  • My phpLD Mods
  • I am *not* a phpLD staff member, so please do *not* ask me to grant permissions, sales stuff, for access to the private supporter forums or phpLD download area.
  • Before you report your problems, make sure it happens with the *default* package and not your highly modified code. Don't forget to use the search feature and do not *bump* threads to soon (allow at least 24h).
Boby is offline  
Old 08-29-2007   #12
Willy
Supporter
 
Join Date: Aug 2007
Posts: 94
Default

I see,

That works nicely, just applied this.

Thanks again and greetings.
Willy is offline  
Old 08-31-2007   #13
dynn
Supporter
 
Join Date: Dec 2005
Location: www.dynn.org
Posts: 177
Default

do you have demo for this?
__________________
dynn is offline  
Closed Thread

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
topic widgets



All times are GMT +1. The time now is 05:59 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.