AJRYAN Posted February 4, 2003 Posted February 4, 2003 I've just spent the last couple of hours trying to figure this out but haven't had any luck. I have checked the board and the documentation, btw. I am trying to add border lines to the top and bottom of the header of the info boxes, and have changed the stylesheet.css file as follows: TD.infoBoxHeading { font-family: Verdana, Arial, sans-serif; font-size: 12px; font-weight: bold; background: #00CCFF; color: #ffffff; border: #000000; border-style: solid; border-top-width: 2px; border-bottom-width: 2px; This doesn't work at all. I am sure there is a real simple answer for this. Please help. Thanks. Art
Guest Posted February 4, 2003 Posted February 4, 2003 Art, Try adding a TR.infoBoxHeading: TR.infoBoxHeading { border: #000000; border-style: solid; border-top-width: 2px; border-bottom-width: 2px; }
gdfwilliams Posted February 4, 2003 Posted February 4, 2003 This is a good contribution that will help you to modify the infoboxes: http://www.oscommerce.com/community/contributions,867 The problem is that the infobox has an infobox in it called infoboxContents. If it comes down to it, check out /includes/classes/boxes.php. In there you'll find where all of the boxes are built and can play with their cellpadding, spacing, etc. Try this: Find this: class infoBox extends tableBox { function infoBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->infoBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="infoBox"'; $this->tableBox($info_box_contents, true); } function infoBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="infoBoxContents"'; $info_box_contents = array(); $size = sizeof($contents); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0; $i<$size; $i++) { $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="boxText"', 'text' => $contents[$i]['text'])); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } Right after, add this: class infoBox_new extends tableBox { function infoBox_new($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->infoBoxContents_new($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="infoBox"'; $this->tableBox($info_box_contents, true); } function infoBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="infoBoxContents"'; $info_box_contents = array(); $size = sizeof($contents); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0; $i<$size; $i++) { $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="boxText"', 'text' => $contents[$i]['text'])); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } That defines a new infobox. Now, in includes/boxes/categories.php (or whatever you're altering), find this: new infoBox($info_box_contents); and replace with this: new infoBox_new($info_box_contents); Now go back into includes/classes/boxes.php and play around with the cellpadding, border, etc settings for infobox_new and infoboxContents_new. If it doesn't help, it will at least give you a better idea of what is going on with those infoboxes! :? (Don't forget to BACKUP!) - Greg
AJRYAN Posted February 4, 2003 Author Posted February 4, 2003 Tried you suggestions but now none of the boxes even show up at all. I'll check out your link though. Art
AJRYAN Posted February 4, 2003 Author Posted February 4, 2003 I've tried both suggestions and checked out the contribution. Unfortunately, the instructions in the contribution leave something to be desired. This seems all to complicated for something that should be an easy fix. I don't understand why a simple change or addition to the stylesheet.css file doesn't seem to do it. Any other suggestions? Thanks. Art
rseigel Posted February 4, 2003 Posted February 4, 2003 That contribution is the easiest one I've ever installed. What exactly don't you understand? It'll help you do exactly what you want to do. :wink:
AJRYAN Posted February 4, 2003 Author Posted February 4, 2003 All I am trying to do is add borders to the boxes, no more, no less. Even if the mod does do what I want, it looks as if it might be a bit of overkill.
AJRYAN Posted February 5, 2003 Author Posted February 5, 2003 Here is what the contribution says. This contribution enables you to have individual images for the header and footer of each infobox on your site. Probably useful to some, but I only want borders. Please help. Thanks.
Guest Posted February 6, 2003 Posted February 6, 2003 I've just run through the process here. http://www.oscdox.com/modules.php?op=modlo...viewtopic&t=371
Recommended Posts
Archived
This topic is now archived and is closed to further replies.