Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Footer Background Color


Guest

Recommended Posts

If you wish to have a colour or an image in the footer, then just make the following changes...

 

Stylesheet.css:

 

To Change Background Colour:

BODY {

 background: #ffffff;

 color: #000000;

 margin: 0px;

}

 

To Add A Background Image:

BODY {

 background: #ffffff;

 background-image: url('http://www.yoursite.com.au/catalog/images/yourimage.jpg');

 color: #000000;

 margin: 0px;

}

 

Now when you do this, the entire sites background will be the color/image you assigned. Not Always Good. So....

 

Edit files: catalog/default.php and every php file under the catalog dir. Just add the bgcolor you want the center elements to be to the table tag. ie:

<!-- body //-->

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

 <tr>

   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

 

Hope this helps anyone who didnt know about it.... Like me :)

 

Example at: http://www.quiveradult.com.au/catalog/default.php

Link to comment
Share on other sites

Moved this to Tips & Tricks.

Please note the stylesheet url() inclusion can bring you problems

whenever you are in secure mode (SSL)

 

You will get the notorious "Some items on this page are not secure" message.

 

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

If you use a relative address for the images in a stylesheet include instead of an absolute address you will have fewer problems with security errors.

 

Example:

images/myBackground.gif - Relative Address

 

http://www.MySite.com/catalog/images/myBackground.gif - Absolute Address.

 

 

NOTE: If your server set up has seperate HTTP and HTTPS directories, you need to up load your images to both and use a relative address.

Link to comment
Share on other sites

  • 1 month later...

Here is a much simplier way to add a

background image in the footer:

 

in the stylesheet.css add this:

 

.footer1 {

background-image: url(IMAGES/YOURIMAGE.gif);

}

 

(IMAGES/YOURIMAGE.gif = the path to your image)

 

then in your footer.php file add this to the FIRST TABLE tag:

 

class="footer1"

 

and you will have an image in the footer of your site. You can actually add an image to the background using the body tag, and still have a separate image for the background of the footer doing it this way.

Thanks,

 

Karole

Link to comment
Share on other sites

  • 6 months later...

Kym,

 

Here ya go...

 

.footer1 {

background-image: url(IMAGES/YOURIMAGE.gif);

}

 

(IMAGES/YOURIMAGE.gif = the path to your image)

 

then in your footer.php file add this to the FIRST TABLE tag:

 

class="footer1"

 

I copied and pasted the css info into my stylesheet and changed the image nameI then added the second part to the "FIRST TABLE TAG" (right after the word 'table', in fact).

I thought that, at first, this was because I actually have "headerNavigation" in my footer and it's been modified for site information (click on the "www" below to see what I mean). So, I uploaded an old backup footer.php (the normal one with the date and the "xxxxxxxxx requests since..." info in the footer bar, and the "smallText"---copyright, etc---below that). Guess what? It didn't make a difference. NOTHING CHANGED.

 

So, there ya have it...THAT'S why I said "this does NOT work".

Hope this all makes sense to you now.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...