View Single Post
Old 08-29-2016, 12:17 AM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,078
Quote:
Originally Posted by ********** View Post
Thanks sarettah, but this doesn't seem to work for me Maybe the format is wrong?

Here's the full line:

<div style="background-image: url(/images20/##Namevar##.jpg), url(/images20/default.jpg);">

(Namevar is dynamic. If the name doesn't exist, it should load default.jpg. but it dont dag nabbit!)
Works for me when I test it. http://madspiders.com/htmltest.html

Tried it in both chrome and firefox and both show the default image when the intro image is not there and show the intro image when it is there. Right now it should be showing the default.jpg because I renamed the intro.jpg to move it out of the way.

Only difference in what code I am using is I have given a width and height attribute because otherwise it is an empty div without any size and won't show at all. I figured you probably had something in the div or had size attributes assigned in a style sheet, but I could be wrong about that.

The code I have in there:

Code:
<html>
  <head>
  <title></title>
  </head>
  <body>
  <div style="width:500px;height:500px;background-image: url(images20/intro.jpg), url(images20/default.jpg);"><div>
  </body>
</html>
.
__________________
All cookies cleared!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote