Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Anybody know how to put a background image in the footer?


Trentide

Recommended Posts

Thanks in advance for looking at this posting. I took out the banner in the footer of my site, and now just have the osc, and copyright text down there. Is there a way to put a background image in the footer? Thank you so much.

 

Jason

Link to comment
Share on other sites

The items in the footer are in a table. Find the line that starts with <table and add

style="background-image: url('images/some_image.gif');"

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for answering, Jack. I've tried putting the code in different spots with no luck. Can you help? Here's my code:

 

<?php

/*

$Id: footer.php,v 1.26 2003/02/10 22:30:54 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require(DIR_WS_INCLUDES . 'counter.php');

?>

<table border="0" width="100%" cellspacing="0" cellpadding="1">

<tr class="footer">

</tr>

</table>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>

</tr>

</table>

<?php

if ($banner = tep_banner_exists('dynamic', '468x50')) {

?>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

</tr>

</table>

<?php

}

?>

</div>

Link to comment
Share on other sites

Thanks for answering, Jack. I've tried putting the code in different spots with no luck. Can you help? Here's my code:

 

<?php

/*

$Id: footer.php,v 1.26 2003/02/10 22:30:54 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require(DIR_WS_INCLUDES . 'counter.php');

?>

<table border="0" width="100%" cellspacing="0" cellpadding="1">

<tr class="footer">

</tr>

</table>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

 

***************put what he said here*******************

 

<tr>

<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>

</tr>

</table>

<?php

if ($banner = tep_banner_exists('dynamic', '468x50')) {

?>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

</tr>

</table>

<?php

}

?>

</div>

Link to comment
Share on other sites

Thanks Vince G. I tried and still no luck. I don't know what's wrong! Can you look at my code?

 

<table border="0" width="100%" cellspacing="0" cellpadding="1">

<tr class="footer">

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0"

style="background-image: url('images/BIG_PISTOL.gif');">

<tr>

<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>

</tr>

</table>

<?php

if ($banner = tep_banner_exists('dynamic', '468x50')) {

?>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

</tr>

</table>

<?php

}

?>

</div>

 

 

 

Thanks Again, Jason

Link to comment
Share on other sites

A few ifs here!

 

If that is your complete code, you are missing a couple of cells <td>

 

If you have removed the date, the requests counter and the horizontal grey bar completely, you don't need the first table. i.e.

 

 <table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="footer">
<br>

 

If you haven't removed that, that is your first missing cell.

 

If that is where you want the bg image, call it from the stylesheet.

 

STYLESHEET

 

table.footImage {
background-image: url('images/BIG_PISTOL.gif');
}

 

TABLE

 

<table class="footImage" border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>
</tr>
</table>

 

If you aren't using the banner function, you don't need that last table.

 

If you are, that is another missing cell.

Link to comment
Share on other sites

Hey Spax. Thanks for helping. That is my complete code.

 

1) I did get rid of the date, the requests counter, and horizontal grey bar. I'm not having a problem with that. do I need to get rid of the table border, width, etc?

 

2)I do want to put a background on my footer. How do I "call it from the style sheet"? Isn't what I did enough when i put this in:

 

style="background-image: url('images/BIG_PISTOL.gif');">

 

3) I;m not using the banner function.

 

Thanks Spax!!

Link to comment
Share on other sites

1, Yes, remove that table as it is missing a cell at present and maybe screwing up the bg image???

 

<table border="0" width="100%" cellspacing="0" cellpadding="1">

<tr class="footer">

<br>

 

 

2, You are using an inline style, which should work but being as it isn't, try it from the stylesheet. Add this to your stylesheet:

 

table.footImage {

background-image: url('images/BIG_PISTOL.gif');

}

 

Then make the table read like so:

 

<table class="footImage" border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>

</tr>

</table>

 

Incidentally

 

If you dont want your background image to repeat, make the stylesheet look like so:

 

table.footImage {

background-image: url('images/BIG_PISTOL.gif');

background-repeat: no-repeat;

}

 

You can also make that repeat-x or repeat-y if you want the image to repeat just horizontally or just vertically.

 

3, Then you can either remove all that code that initiated it, plus the table.

 

<?php

if ($banner = tep_banner_exists('dynamic', '468x50')) {

?>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

</tr>

</table>

<?php

}

?>

 

Or, in case you may want to use it later, just put in an empty cell, with the php code commented out

 

<?php

if ($banner = tep_banner_exists('dynamic', '468x50')) {

?>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td align="center"><?php // echo tep_display_banner('static', $banner); ?></td>

</tr>

</table>

<?php

}

?>

Link to comment
Share on other sites

I've tried but still no success. I don't know where I'm going wrong. Can you look at my code again?

 

require(DIR_WS_INCLUDES . 'counter.php');

?>

<table class="footImage" border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>

</tr>

</table>

<?php

if ($banner = tep_banner_exists('dynamic', '468x50')) {

?>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td align="center"><?php // echo tep_display_banner('static', $banner); ?></td>

</tr>

</table>

<?php

}

?>

</div>

 

Thanks Spax

Link to comment
Share on other sites

1) yes, this is what is looks like in style sheet:

 

table.footImage {

background-image: url(images/BIG_PISTOL.gif);

background-repeat: no-repeat;

 

2) the name is BIG_PISTOL.gif and its uploaded to the server.

 

3) it is in the images directory.

 

Im stuck!!

 

-Jason-

Link to comment
Share on other sites

Still no luck. This is what my style sheet looks like:

 

table.footImage {

background-image: url('images/BIG_PISTOL.gif');

background-repeat: no-repeat;

}

 

Now, this part turned a curious green color:

 

'images/BIG_PISTOL.gif' - (It doesn't look right.)

 

Also, when I put the pistol gif in the background of the main center page it doesn't have the ' '.

 

Thanks, I really appreciate it.

 

-Jason-

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...