Guest Posted May 8, 2003 Posted May 8, 2003 hey guys, it's court i'm trying to change my boxes so that they look like this... http://www.wavemx.com/osg/catalog/default.php this is what i have so far.... http://www.greekretreat.com/default.php I can't get the middle to align and i can't get the header image to shrink... this is my box: <!-- categories //--><tr> <td class="tableheading" background="images/categories2.jpg" border="0" width="125" height="40" style="padding-top:0px;padding-left:40px;"><b>Categories</b></td> </tr> <tr> <td background="images/back_left1.jpg" alt="click to view"> <table border="0" cellpadding="0" cellspacing="0"> <tr> </td> </tr> <tr> <td style="padding-left:30" class="cat"> <tr> <td> <?php $categories_string = ''; $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $foo[$categories['categories_id']] = array( 'name' => $categories['categories_name'], 'parent' => $categories['parent_id'], 'level' => 0, 'path' => $categories['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $categories['categories_id']; } $prev_id = $categories['categories_id']; if (!isset($first_element)) { $first_element = $categories['categories_id']; } } //------------------------ if ($cPath) { $new_path = ''; $id = split('_', $cPath); reset($id); while (list($key, $value) = each($id)) { unset($prev_id); unset($first_id); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $value . "' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name"); $category_check = tep_db_num_rows($categories_query); if ($category_check > 0) { $new_path .= $value; while ($row = tep_db_fetch_array($categories_query)) { $foo[$row['categories_id']] = array( 'name' => $row['categories_name'], 'parent' => $row['parent_id'], 'level' => $key+1, 'path' => $new_path . '_' . $row['categories_id'], 'next_id' => false ); if (isset($prev_id)) { $foo[$prev_id]['next_id'] = $row['categories_id']; } $prev_id = $row['categories_id']; if (!isset($first_id)) { $first_id = $row['categories_id']; } $last_id = $row['categories_id']; } $foo[$last_id]['next_id'] = $foo[$value]['next_id']; $foo[$value]['next_id'] = $first_id; $new_path .= '_'; } else { break; } } } tep_show_category($first_element); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => $categories_string ); new infoBox($info_box_contents); ?> </td> </tr> </tr> </table> <tr> <td><img src="images/bottom_left_1.gif" border="0" width="125" height="15" alt="click to view"></td> </tr> <!-- categories_eof //-->
OnePhatWebyCat Posted May 8, 2003 Posted May 8, 2003 :lol: 100% for trying :idea: why not try to full understand what makes the boxes do that. :arrow: they are controlled by to things the CSS style sheet and what it contains and the actual code. :lol: the CSS can include background: url (images/infobox/mybackground.gif); and the code has a few ways it can display the "heads" lets take catagories.php location: catalog/includes/boxes/categories.php the code that controll the layout is $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES ); new infoBoxHeading($info_box_contents, true, false); now what controll how that "head" looks is new infoBoxHeading($info_box_contents, true, false); the true and false turn on and off the right and left corners and these gifs are located in catalog/images/infobox now where to add that line background: url (images/infobox/mybackground.gif); this goes in the stylesheet.php but where :?: :roll: TD. infoBoxHeading { background: url (images/infobox/mybackground.gif); } :!: :lol: enjoy :lol: Ps. seeing you are working on a live store i think. BACK IT ALL UP INCLUDEING YOUR DATABASE :!: first rule: Allways make a backup of a file before you change it. & All code is CASE Sensitive :!: second rule: Never copy and paist code unless you know it works. :!: third rule: If you do not know ask. :!: final rule: Have patience.
Guest Posted June 9, 2003 Posted June 9, 2003 I put this in TD.infoBoxHeading { background: url(images/infobox/categories2.jpg); font-family: Verdana, Arial, sans-serif; font-size: 10px; font-weight: bold; background: #bbc3d3; color: #ffffff; } I have also tried removing everything but D.infoBoxHeading { background: url(images/infobox/categories2.jpg); } but that still does not help. when I look for the images/infobox/categories2.jpg in my browser it is there. Any other thoughts. Also I tried both false and false and true true for the categories.php Thanks -Al
Guest Posted June 10, 2003 Posted June 10, 2003 is there a way to call an image in an array? You could look at how boxes.php calls the corner gifs for the header & copy that.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.