Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2005
    Posts
    555
    Plugin Contributions
    4

    Default Category box css question.

    Hi,
    Im going a bit crazy going round and round in circles...

    Im trying to achieve Pic 1 (jpg on the left)
    But currently have Pic 2 (gif on the right)

    Its .category-top that controls this I believe and this is currently looking....

    .category-top {
    background-color: #ffffff;
    padding-left: 15px;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-right: 35%;
    font-size: 1.em;
    }

    I realise that its the padding right that controls this and this is ultimately controlled by class="sideBoxContent"

    Does anyone have any idea how I can fix the width of the padding that creates the white box
    If I put padding-right: 35px; or similar it looks weird for short categories.

    Thanks in advance.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	1.jpg 
Views:	344 
Size:	10.7 KB 
ID:	648   Click image for larger version. 

Name:	2.gif 
Views:	309 
Size:	774 Bytes 
ID:	649  
    My humble contributions....
    Info at a Glance Admin, Alternative Header & Improved Whos Online + Currently working on the next!
    If you have to think..... your obviously looking at the admin :)

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Category box css question.

    Hi Reesy

    Padding will only extend the coloured area from the edge of the content. Have you tried changing / fixing the width?
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Mar 2005
    Posts
    555
    Plugin Contributions
    4

    Default Re: Category box css question.

    Ohayo Kuroi-san genki? ;)
    I tried adding width: 50px; or similar to the .category-top css and it did.... nothing
    Was that the wrong way around it?
    Last edited by Reesy; 21 Sep 2006 at 03:44 PM.
    My humble contributions....
    Info at a Glance Admin, Alternative Header & Improved Whos Online + Currently working on the next!
    If you have to think..... your obviously looking at the admin :)

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Category box css question.

    There's a couple of things here ... it's difficult to advise without a link to be able to see the full context (e.g. work out to what you are applying the category-top class the links or the list items, and also whether they are block or inline elements - but you know that so I'm assuming that you are unable to provide a link at the moment.

    The other thing is that 50px would be unlikely to have an impact anyway, as it looks to me as though your content is already wider than that. I'd at least try a much bigger value to see the impact.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Mar 2005
    Posts
    555
    Plugin Contributions
    4

    Default Re: Category box css question.

    Id love to give a link if poss... but its not unfortunately.
    50px was just an example, it was the first key I hit
    PHP Code:
    case ($box_categories_array[$i]['top'] == 'true'):
            
    $new_style 'category-top';
            break; 
    Is from the categories template file so I added the css in the above post.

    I just realised that you might have to go digging to look for that code above so heres a bit more from the same template file.

    PHP Code:
    $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=3'):
    //        $new_style = 'category-holiday';
    //        break;
          
    case ($box_categories_array[$i]['top'] == 'true'):
            
    $new_style 'category-top';
            break; 
    My humble contributions....
    Info at a Glance Admin, Alternative Header & Improved Whos Online + Currently working on the next!
    If you have to think..... your obviously looking at the admin :)

  6. #6
    Join Date
    May 2006
    Posts
    24
    Plugin Contributions
    0

    Default Re: Category box css question.

    If - in your css - for the content or wrapper around it a width has been defined, you can set the width of your white box to 100%. If you would like to keep a smal border set it to 90 or 80% and align to center or set a margin-left.

    Maybe that is what you are looking for?

 

 

Similar Threads

  1. Advanced Search Question (limit to category box)
    By gazag in forum Templates, Stylesheets, Page Layout
    Replies: 61
    Last Post: 8 May 2013, 01:29 AM
  2. CSS Question I think. NEW PRODUCTS Box in yellow
    By milobloom in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 16 Aug 2007, 01:58 AM
  3. I'm not sure if this is a CSS question or an admin panel question....
    By kinget in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 24 Mar 2007, 08:29 PM
  4. Product Category Box Question
    By labelsru in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 May 2006, 11:19 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