![]() |
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"> And the CSS style I've attached to the table is: Code:
.HomepagePics { 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"> Thanks for any help!! - I have asked this one before but had no replies :( |
Have you tried setting the background image using CSS? The way you are using is not valid html anymore :(
|
All times are GMT -8. The time now is 09:34 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.