two "same" random background image

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
firfelin

two "same" random background image

Post by firfelin »

Hi,

My english is crappy, so I'll try to explain slowly... :-\

Currently I have one image repeated for the body background and one for the header

I would like to change them randomly but related (image_body_1 with image_header_1 etc...)

For  a normal static html-css site I found this:

Code: Select all

<?php
$numero = rand(1, 5);
?> 

<div id="body" style="background: url(folder_1/image<?php echo $numero;?>.gif)">
<div id="header" style="background: url(folder_2/image<?php echo $numero;?>.gif)">
</div>
</div>

But I dont know how to integrate it in my  cmsms template...

Thanks in advance for your help
Last edited by firfelin on Fri Aug 03, 2007 3:08 pm, edited 1 time in total.
Locked

Return to “Layout and Design (CSS & HTML)”