Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Add random image as background - works in Safari only...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-05-2006, 01:23 PM
 
dannyrus dannyrus is offline
 

Member
  
Join Date: Sep 2005
Posts: 18
 

Default Add random image as background - works in Safari only...

Hi, I've added some script to randomly display one of 3 images on my homepage, but I've set it to display in the background of a table so that if the window is resized it just shows more or less of the image.

For some reason it only displays correctly in Safari on Mac. I've tested on Firefox, Opera, Netscape & Explorer on PC and Mac and none of these display correctly. The code for the table (in /customer/main/welcome.tpl) is:

Code:
<table width="100%" height="290" border="0" cellspacing="0" cellpadding="0" background="{$ImagesDir}/homepics/psco{"1"|mt_rand:3}.jpg" class ="HomepagePics"> <tr> <td></td> </tr> </table>

And the CSS style I've attached to the table is:

Code:
.HomepagePics { background: #fff no-repeat; }

Can anyone see why it won't display in most browsers??

If I have the image display directly in the table it works in all browsers but it stretches the screen to the size of the image which I don't want. That code is:

Code:
<table width="100%" height="290" border="0" cellspacing="0" cellpadding="0"> <tr> <td>[img]{$ImagesDir}/homepics/psco{[/img]</td> </tr> </table>

Thanks for any help!! - I have asked this one before but had no replies
__________________
Danny - Photoscope Б─╒ X-Cart Version 4.0.14
Reply With Quote
  #2  
Old 03-28-2006, 05:19 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Have you tried setting the background image using CSS? The way you are using is not valid html anymore
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:13 AM.

   

 
X-Cart forums © 2001-2020