Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Mar 2011
    Posts
    65
    Plugin Contributions
    0

    Default sidebox/header link color

    Hello,

    I've been trying to change the color of one link in my sidebox and in my header. I can't seem to locate them in my stylesheet, and have no idea how to go about changing the color of one specific link. If anyone has any advice or suggestions it would be greatly appreciated. I'm using the latest version, and my site is:

    http://www.kamskungfucinema.com/zencart/

    ...with the link "NEW & RARE" needing its color changed

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: sidebox/header link color

    You can't, really, with the standard Zencart categories box. There's a mod in the Free Software Add Ons which converts the Categories box to an unordered list. You might be able to specify a class name for that list item and style it in the stylesheet.

  3. #3
    Join Date
    Mar 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: sidebox/header link color

    OK, thanks, I'll give that a try. Any idea what this mod is called?

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

  5. #5
    Join Date
    Mar 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: sidebox/header link color

    I found this in an older post:

    tpl_categories.php has a commented section describing how to make individual categories have their own styling. You can do this for each category by adding a case section in tpl_categories.php and a rule in the stylesheet for each class you so define.

    Say you call one category "category-holiday" as described, you would then add to your stylesheet

    a.category-holiday {color: #aabbcc;}

    Adjust the color as desired.

    Can it be done this way?

  6. #6
    Join Date
    Mar 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: sidebox/header link color

    Though I'm still unsure of what they mean by adding a "case" and "rule", just like I'm not sure what you mean by "specify a class name for that list item"

  7. #7
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: sidebox/header link color

    I hadn't seen that. Just uncomment these lines from the original tpl_categories.php file:

    // case ($box_categories_array[$i]['path'] == 'cPath=3'):
    // $new_style = 'category-holiday';
    // break;


    by removing the // before each one, change the '3' to the id number of the category you want to style, then save the file to your custom template's sideboxes folder.

    Then add this to the stylesheet and style it the way you want - this will make the link red:

    A.category-holiday {color:#ff0000;}

  8. #8
    Join Date
    Mar 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: sidebox/header link color

    Hmm....no color change, it just made it so my site wont scroll down. Did I edit the code correctly?

    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
    for ($i=0;$i<sizeof($box_categories_array);$i++) {
    switch(true) {
    // to make a specific category stand out define a new class in the stylesheet example: A.category-holiday
    // uncomment the select below and set the cPath=3 to the cPath= your_categories_id
    // many variations of this can be done
    case ($box_categories_array[$i]['path'] == 'cPath=10'):
    $new_style = 'category-holiday';
    break;

  9. #9
    Join Date
    Mar 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: sidebox/header link color

    Oh...nevermind my site will scroll.

    Just no color change

  10. #10
    Join Date
    Mar 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: sidebox/header link color

    Or does it matter where I add it in my style sheet?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. header link color change
    By webguy in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 23 Feb 2010, 05:22 AM
  2. Color of link in the Header
    By VisExp in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 22 Oct 2008, 02:11 PM
  3. Customize Color of Sidebox Name (Link)
    By neophyte2007 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 3 Sep 2007, 07:35 PM
  4. sidebox bg color and header color wont change..
    By zc-newbie in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 Jul 2007, 01:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR