Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default sub-category images in css

    Hi.

    My goal is to render a background with rounded corners and matched font for the sub-category images. I found the class 'CategoryListBoxContents' but I suspect this will also change the top-level categories.

    1) I would like to implement something like this:

    #relevant_class{
    text-align:center;
    border-radius:3px 3px 0px 0px;
    -moz-border-radius:3px 3px 0px 0px;
    -webkit-border-radius:3px 3px 0px 0px;
    background:url(../images/menu-bg2.gif) repeat-x right top #59890d;

    here:

    familynowDOTcaSLASHshop/index.php?main_page=index&cPath=55 (It'll be nice when my site is public so I can stop listing the URL like this!)

    To be specific, I'm referring to the "And another Rice Pasta" with the green bg. The others we merely examples for my wife to choose from.

    2) It appears to me that the current implementation forces an image rather than text. If I turn the text link back on can I simply modify that css(above) entry to get what I want perhaps?

    Thank in advance for any assistance.

  2. #2
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default Re: sub-category images in css

    Okay. I've been working on this all morning...

    Turns out my thought about turning text links back on and playing with that CSS was right. And that categoryListBoxContents doesn't change the top-level. So far so good except that I can't seem to figure out why there a break or line being rendered with a darker section at the bottom in the background img. I suspect this might be some trailing code for the initial text link but can't figure it out.

  3. #3
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default Re: sub-category images in css

    Back again...I appear to be chatting with myself. Anyway. In the interest of potentially helping someone else.

    I've managed to work everything out with this:

    /*sub-cats*/
    .categoryListBoxContents {
    background:url(../images/menu-bg2.gif) repeat-x right top #59890d;
    border-radius:15px;
    -moz-border-radius:15px;
    -webkit-border-radius:15px;
    text-align:center;
    vertical-align:center;
    padding:15px 15px;
    margin:5px 5px;
    }
    .categoryListBoxContents a {
    color:#FFFFFF;
    text-decoration:none;
    text-transform:none;
    text-align:center;
    vertical-align:center;
    font-weight:bold;
    font-size:12px;
    }

    .categoryListBoxContents a:hover {
    color:#0D474E;
    }

    .categoryListBoxContents img {visibility:hidden;}

    /*end sub-cats*/

    in stylesheet_main.css and it looks like this:

    familynowDOTcaSLASHshop/index.php?main_page=index&cPath=47

    Now I'm stuck at width:auto; somewhere in css and width:20%; auto generated at the browser level. This leaves me with 5 columns which wraps the last columns on the following rows. I want to enforce up to 4 columns max.

    I don't think this one is going to come to me...I've been fooling around with this for hours...Help?

  4. #4
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default Re: sub-category images in css

    Well, it only took an entire day but I got it...

    FYI

    I copied ../common/tpl_columnar_display.php to my template dir and commented out the <br clear:both /> line

  5. #5
    Join Date
    Aug 2011
    Location
    Near Ottawa, Ontario, Canada
    Posts
    321
    Plugin Contributions
    0

    Default Re: sub-category images in css

    CORRECTION:

    If you do the above you've break any sidebox that tries to display below. Changing this:

    ?>
    <br class="clearBoth" />
    <?php
    }
    }
    ?>

    to this:
    ?>

    <?php
    }
    }
    ?>
    <br class="clearBoth" />

    Seems to fix the colum/row display issue and still allows sideboxes/content below.

 

 

Similar Threads

  1. v151 Display images of Sub-Sub category in Main page while navigating.
    By Javier Romero in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 3 May 2013, 10:02 AM
  2. Replies: 1
    Last Post: 1 May 2013, 10:20 PM
  3. Remove category, sub category, big links silly stock images....
    By joyjoy in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Sep 2010, 10:31 AM
  4. How to NOT display sub sub category images?
    By magneteye in forum General Questions
    Replies: 19
    Last Post: 11 Apr 2009, 05:09 AM
  5. Sub-category listing css...
    By Alex Clarke in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 Sep 2007, 01:23 PM

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