X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   header/footer background images (https://forum.x-cart.com/showthread.php?t=44298)

tbm 12-18-2008 01:59 AM

header/footer background images
 
Hey,

Adding a header and footer to my x-cart site. Initially I just added basic tables to the rectangle_bottom.tpl and rectangle_top.tpl files, dumped the images into the tables and it worked fine. But I now want to set them as background images so i can over-lay menus, text etc.

after messing about with various table attributes I got as close as i could with tables using this:

Code:

<td height="52" width="988" style="margin-left:auto; background-image:url(images/footer.jpg); background-repeat: no-repeat">Text Text Text</td>

but I can't get it quite right and i want to use CSS. So I tried this:

in the table
Code:

<td class="new_footer"></td>

in the CSS
Code:

TD.new_footer {
    background-image: url(images/footer.jpg) top left repeat-x;
}


but the image isn't even appearing. can anybody see where I might be going wrong?

balinor 12-18-2008 03:21 AM

Re: header/footer background images
 
Did you add the image to skin1/images? Because that is where the images/ directory is if you are calling it from the CSS file.

tbm 12-18-2008 03:51 AM

Re: header/footer background images
 
I did. The image is there. It reallys seems like it should be working, but it's not.

Should I be able to call the class from the rectangle_bottom.tpl file? like, in the process of the .tpl file being embedded could the link to the skin1.css be broken?

balinor 12-18-2008 04:29 AM

Re: header/footer background images
 
It should work fine. Try just the background image part to start:

background: url(images/footer.jpg);

tbm 12-18-2008 05:10 AM

Re: header/footer background images
 
yeah, its not taking. here's exactly what i have.

this table in rectangle_bottom.tpl:

Code:

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="new_footer"></td>
  </tr>
</table>


and i've added this to my CSS:

Code:

TD.new_footer {
    background: url(images/footer.jpg);
}


footer.jpg is sitting in my skin1/images folder. this all looks fine, but i am not seeing the image.

balinor 12-18-2008 05:23 AM

Re: header/footer background images
 
Put some content IN the table cell so that it has some room to show the image :)

tbm 12-18-2008 05:33 AM

Re: header/footer background images
 
have it sorted!!!

silly syntax error. thanks!!!


All times are GMT -8. The time now is 11:58 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.