kywee Posted March 21, 2007 Posted March 21, 2007 Hi, I have been trying to change the presentation of my category box contents, but I can't seem to find a contribution or idea on how to do so. I would just like to center the text in my categories box and add a horizontal line between each category. Any help would be appreciated. Thank you! -Kyle
kywee Posted March 21, 2007 Author Posted March 21, 2007 I was thinking that. I tried out different variations and I have this contribution installed so I even messed with that. Maybe I'm not putting it in the right place, but I was sure that text-align: center; would center the categories in the box, but it didn't. Here is the code: /* Graphical Borders - boxes column_left_right - Star */ .mws_boxTop { background: url('images/infobox/top.gif'); font-family: Tahoma; font-size: 11px; text-align : center; font-weight: bold; background-repeat:repeat-x; vertical-align: middle; white-space: nowrap; } .mws_boxLeft { background: url('images/infobox/left.gif'); } .mws_boxRight { background: url('images/infobox/right.gif'); } .mws_boxBottom { background: url('images/infobox/bot.gif'); font-family: Verdana, Arial, sans-serif; font-size: 11px; text-align : center; vertical-align: middle; white-space: nowrap; } .mws_boxCenter { background: #D6F1FF; } /* Graphical Borders - boxes column_left_right - Star */ /* Graphical Borders - boxes main modules and file-pages - Star */ .mws_boxTop_main { background: url('images/infobox_main/top.gif'); font-family: Tahoma; font-size: 11px; text-align : center; font-weight: bold; background-repeat:repeat-x; vertical-align: middle; white-space: nowrap; } .mws_boxLeft_main { background: url('images/infobox_main/left.gif'); } .mws_boxRight_main { background: url('images/infobox_main/right.gif'); } .mws_boxBottom_main { background: url('images/infobox_main/bot.gif'); font-family: Verdana, Arial, sans-serif; font-size: 11px; text-align : center; vertical-align: middle; white-space: nowrap; } .mws_boxCenter_main { background: #FFFFFF; } /* Graphical Borders - boxes main modules and file-pages - End */ I'm still trying to figure it out, again any help would be appreciated.
bill110 Posted March 21, 2007 Posted March 21, 2007 catelog/includes/boxes/categories.php find this in the code and edit the td tag to add the alignment.(it will also align the box heading.) <!-- categories //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES); for the horizontal row find this tep_show_category($first_element); $info_box_contents = array(); $info_box_contents[] = array('text' => $categories_string); new infoBox($info_box_contents); and change to this tep_show_category($first_element); $info_box_contents = array(); $info_box_contents[] = array('text' => $categories_string . '<hr>'); new infoBox($info_box_contents); At the top of the page there is also a couple of & nbsp; (without the space) that you might need to remove. My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai
kywee Posted March 21, 2007 Author Posted March 21, 2007 Hi Bill, I tried adding <align="center"> and p align, but it did nothing. Maybe I'm not adding it in the right spot, but I tried within the td tag and outside it. I added the HR, but it only added a line under the last category, not between them. Were on to something, so that's good. Thanks
bill110 Posted March 22, 2007 Posted March 22, 2007 OK in the same file find this: if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } $categories_string .= '<br>'; [code] and change to this [code] if (SHOW_COUNTS == 'true') { $products_in_category = tep_count_products_in_category($counter); if ($products_in_category > 0) { $categories_string .= ' (' . $products_in_category . ')'; } } $categories_string .= '<br><hr>'; You may then need to delete the hr tag from my prev post. You just need to test it. My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai
Guest Posted March 25, 2007 Posted March 25, 2007 Hi everybody, Can anyone perhaps point me in the right direction to get my buttons sorted again... Look at the pic, the buttons are not underneath each other anymore.... http://www.oscommerce.com/community/contributions,4075 That is the only contrib I've installed that touches the catalog/includes/boxes/categories.php file.... Thanks for the help in advance!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.