J.G. Coleman
New member
I'm using a PHP include to insert the path of a randomly chosen JPG image into the 'background-image' element of a DIV's Style tag. For example:
<div style="background-image:url('<?php include 'random_image.php'; ?>');">
becomes <div style="background-image:url('images/1.jpg');">, which fills the DIV background with a random image.
The source code is rendered identically by IE and FireFox. But although it displays properly in IE, no image actually appears in Firefox. The source code in both browsers is the same (as shown above), but FireFox neglects to display the background-image in the DIV.
<div style="background-image:url('<?php include 'random_image.php'; ?>');">
becomes <div style="background-image:url('images/1.jpg');">, which fills the DIV background with a random image.
The source code is rendered identically by IE and FireFox. But although it displays properly in IE, no image actually appears in Firefox. The source code in both browsers is the same (as shown above), but FireFox neglects to display the background-image in the DIV.