Guest Posted February 27, 2003 Share Posted February 27, 2003 Can someone help me figure out how to put a background image in a table in the header.php? I'm just not sure what the proper format it. I understand the system for adding images, but it's not working for my background images. Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2003 Share Posted February 27, 2003 Mark, You could tag the table with a class tag in the stylesheet and add your image to the background or you can just add an image to the table like you would do in html. Do you have a site where the problem is? Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2003 Share Posted February 27, 2003 Thanks for the suggestion. I'll try using the class tag. The problem with using the standard HTML is that then the backgroung doesn't show up when you're on the secure part of the site. And if you use an absolute link, then the secure padlock won't show up. the site (still in progress) is http://www.wowandzen.com/default.php Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2003 Share Posted February 27, 2003 Does anyone know if I can I place PHP code in my CSS file? The following CSS tag works the way I want but when you get to the secure part of the site, the gold padlock no longer shows up... TR.header { background: #CC3300; background-image: url("http://www.wowandzen.com/images/wowzen/header_backgroung.jpg") } When I use a relative link in the above, it doesn't work. Can I do something like the below? TR.header { background: #CC3300; background-image: url("<?php echo tep_image(DIR_WS_IMAGES . 'wowzen/header_backgroung.jpg', ''); ?>") } Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2003 Share Posted February 27, 2003 Ok... As a temporary solution I am doing this... I'm calling the image with an absolute through the secure server. However, I don't know what other problems that may cause me down the road. If anyone knows a better solution, I'd love to hear. Thanks Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2003 Share Posted February 27, 2003 TABLE.header { background: url(images/header1.png); } Here's how I have mine and it works in both secure and non secure mode. ...and the code I have for my header....It is centered/fixed width. <table class="pageBG" width="774" align="center" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <table width="774" border="0" cellspacing="0" cellpadding="0"> <tr> <td > <table class="header" width="775" border="0" cellspacing="0" cellpadding="0"> <tr> <td > <table width="713" border="0" align="center" cellspacing="3" cellpadding="0"> <tr height="100"> <td width="550" align="center" valign="bottom"> </td> <td class="accountCategory" align="right" valign="bottom"> <table align="right" class="infoBox" width="140" border="0" cellspacing="1" cellpadding="1"> <tr> <td class="accountCategory" align="right"> Items: </td> <td class="accountCategory" align="left"> <?php echo $cart->count_contents(); ?> </td> <td class="accountCategory" align="right"> Total: </td> <td class="accountCategory" align="left"> <?php echo $currencies-> format($cart->show_total()); ?> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <table class="headerNavigation" border="0" width="765" height="21" align="center" cellspacing="0" cellpadding="0"> <tr> <td align="left"> <?php echo $breadcrumb-> trail(' » '); ?> </td> <td align="right"> <?php if (tep_session_is_registered('customer_id')) { ?> <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'NONSSL'); ?> " class="headerNavigation"> <?php echo HEADER_TITLE_LOGOFF; ?> </a> | <?php } ?> <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?> " class="headerNavigation"> <?php echo HEADER_TITLE_CART_CONTENTS; ?> </a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'); ?> " class="headerNavigation"> <?php echo HEADER_TITLE_CHECKOUT; ?> </a> </td> </tr> </table> <?php if ($HTTP_GET_VARS['error_message'] != '') { ?> <table width="775" border="0" align="center" cellspacing="2" cellpadding="2"> <tr class="headerError"> <td class="headerError" align="center"> <?php echo urldecode($HTTP_GET_VARS['error_message']); ?> </td> </tr> </table> <?php } if ($HTTP_GET_VARS['info_message'] != '') { ?> <table border="0" width="100%" align="center" cellspacing="2" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo" align="center"> <?php echo $HTTP_GET_VARS['info_message']; ?> </td> </tr> </table> </td> </tr> </table> <?php } ?> Link to comment Share on other sites More sharing options...
Jason Jacobs Posted February 27, 2003 Share Posted February 27, 2003 I don't have an answer to your problem, but I like your customization. :) -j Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.