Webmastersite.net
Register Log In

Bg colors
Different background colors for links

Comments on Bg colors

blackkn58
Member

Usergroup: Customer
Joined: Feb 01, 2006

Total Topics: 4
Total Comments: 14
Posted Feb 24, 2006 - 8:51 AM:

I would like to have every second links background color to be grey but in the displaylinks.tpl makes the whole table grey or white etc... and not every second link. Is their a way t write an IF statement like IF linkid is odd then make background color f7f7f7 or am I going to have to edit the style.css. Not sure how to do either. I would like to do this to break up the links so users don't go cross eyed from the white background I have now.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 24, 2006 - 11:11 PM:

<?php if ({LINKNUMBER} % 2) { ?>even<?php } else { ?>odd<?php } ?>
blackkn58
Member

Usergroup: Customer
Joined: Feb 01, 2006

Total Topics: 4
Total Comments: 14
Posted Feb 25, 2006 - 2:14 PM:

Well that looks splendid, but what am I supposed to do with that piece of code?confusedsmiling face
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 25, 2006 - 4:48 PM:

Place it in your template where you want to show your even/odd html.

If you're confused by it being PHP instead of a conditional, read scripts.webmastersite.net/w...inks/wsnmanual/articles/16
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.