Author Topic: Modify the color of links for each category  (Read 9964 times)

0 Members and 1 Guest are viewing this topic.

Offline slap.her

  • Pre-Newbie
  • Posts: 7
    • View Profile
Modify the color of links for each category
« on: November 09, 2006, 05:24:06 PM »
This is my first post, & I hope I'm doing it right...  :oops:

I'm using version 1.7.3, & would like to know how to modify the color of the links for each category. That's to say, I would like each category to have its own color for links : category 1 have all links be red, category 2 have all links be blue, etc.

I wouldn't know where to modify bits, & even less how to, so any help would be great! Thanks a lot!

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Modify the color of links for each category
« Reply #1 on: November 09, 2006, 05:50:02 PM »
befor you make any modifications please update to 1.7.4...

Offline slap.her

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Modify the color of links for each category
« Reply #2 on: November 09, 2006, 09:48:30 PM »
Ok, I'll update tonight. :)

Offline slap.her

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Modify the color of links for each category
« Reply #3 on: November 10, 2006, 01:00:19 PM »
It's updated... Any ideas... pretty please?  :)

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Modify the color of links for each category
« Reply #4 on: November 10, 2006, 01:20:38 PM »
Only the Main Category?

Offline slap.her

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Modify the color of links for each category
« Reply #5 on: November 10, 2006, 01:32:28 PM »
Ack sorry I didn't explain well enough!  :oops:

Ok, so... say I have a category called "photos", another called "textures", & a third called "brushes". I would want each of these categories to have different colors for the links. On the "home" page, I'd want the links to show the different colors of the categories (photos in blue, textures in pink, brushes in green), & then on each category page, I would want the links to be the one color... (all links be blue on all pages belonging to the photos category, etc.).

Pretty much like that http://iconographer.geekbutchic.com/downloads/index.php with the different colors in the "navigation" for the main page, & then on one category... all links be the same, but different from the other categories. Sorry the page's something of a mess... it's still very much being built!

Hope I'm explaining it right!

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Modify the color of links for each category
« Reply #6 on: November 10, 2006, 01:38:58 PM »
Take the category_bit.html Template an change ist like this:

Quote
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
     <img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />
      <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}  -->
    </td>
    <td>
     <a href="{cat_url}" class="maincat{cat_id}">{cat_name}</a>&nbsp;({num_images})
      {if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}
   </td>
  </tr>
</table>
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
{if sub_cats}{sub_cats}{endif sub_cats}

Than you can copy the maincat Style in the CSS and name ist maincatX (X is the Cat id)...
I hope you understand it... *g*

Offline slap.her

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Modify the color of links for each category
« Reply #7 on: November 10, 2006, 02:35:38 PM »
Thanks for your quick answer! :) I think I understand the trick... but I can't seem to make it work. So maybe I think I understand it, but don't. Gah. LOL

I added the {cat_id} where supposed, & then in my style.css I added the following:

.maincat3 a:link, .maincat3 a:active, .maincat3 a:visited {
cursor: help;
text-decoration: none;
color: #00c4c4;
}

.maincat3 a:hover {
background-color: #00c4c4;
text-decoration: none;
color: #FFFFFF;
}

(3 being the ID of one of my categories...)

I get the default browser links for all categories, including my category 3.

Also... that modification would only change the color of links for the category link, wouldn't it? Because what I'd want would be to change the color of all links on the page, according to the category it belongs to... wouldn't I need to make other changes for that, like perhaps functions.php or... something? Oh my, sorry to sound so confused.  :oops:

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Modify the color of links for each category
« Reply #8 on: November 10, 2006, 02:37:25 PM »
can i see it? url? (o:

Offline slap.her

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Modify the color of links for each category
« Reply #9 on: November 10, 2006, 02:53:37 PM »
Here is the style.css : http://iconographer.geekbutchic.com/downloads/templates/4_no_rand/style.css

... I realize I should have said I'm using a template. *bangs head* It's 4_no_rand by http://www.vierstra.com/... or so it was before I tried to integrate it into my website. Ack. LOL

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: Modify the color of links for each category
« Reply #10 on: November 10, 2006, 02:58:20 PM »
try it like this:

Code: [Select]
a.maincatX:link, a.maincatX:visited, a.maincatX:active, a.maincatX:hover {

}

Offline slap.her

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Modify the color of links for each category
« Reply #11 on: November 10, 2006, 03:11:33 PM »
That works! Yay! Thanks a lot for your help (& your patience)!  :D