Originally posted by: notfred
CSS is not a programming language, so it doesn't have things like a random number generator or counters, or any other way to select one image from a list of images. You will need to use javascript or a server-side language to do this. It would be pretty easy to do with iether Javascript or PHP.
Originally posted by: thereds
Originally posted by: notfred
CSS is not a programming language, so it doesn't have things like a random number generator or counters, or any other way to select one image from a list of images. You will need to use javascript or a server-side language to do this. It would be pretty easy to do with iether Javascript or PHP.
Can you explain how...
This is the code in my stylesheet:
.header {
margin: 1px 0px;
padding: 0px;
display: block;
width: 778px;
height:98px;
background: url('header.png') no-repeat bottom center;
background-color: #9DA7AF;
border: 1px solid #D6D3CE;
cursor: pointer;
}
header.png is what I will need to change, as you would have probably guessed.
This .header is called from my header.php file by <div class="header">
Now...?
Originally posted by: Chosonman
Originally posted by: thereds
Originally posted by: notfred
CSS is not a programming language, so it doesn't have things like a random number generator or counters, or any other way to select one image from a list of images. You will need to use javascript or a server-side language to do this. It would be pretty easy to do with iether Javascript or PHP.
Can you explain how...
This is the code in my stylesheet:
.header {
margin: 1px 0px;
padding: 0px;
display: block;
width: 778px;
height:98px;
background: url('header.png') no-repeat bottom center;
background-color: #9DA7AF;
border: 1px solid #D6D3CE;
cursor: pointer;
}
header.png is what I will need to change, as you would have probably guessed.
This .header is called from my header.php file by <div class="header">
Now...?
I spend my time writing this code for you, not even a thanks, or any acknoledgement? That's the last time I help you...
You need to use javascript... THE END
Originally posted by: thereds
Originally posted by: notfred
CSS is not a programming language, so it doesn't have things like a random number generator or counters, or any other way to select one image from a list of images. You will need to use javascript or a server-side language to do this. It would be pretty easy to do with iether Javascript or PHP.
Can you explain how...
This is the code in my stylesheet:
.header {
margin: 1px 0px;
padding: 0px;
display: block;
width: 778px;
height:98px;
background: url('header.png') no-repeat bottom center;
background-color: #9DA7AF;
border: 1px solid #D6D3CE;
cursor: pointer;
}
header.png is what I will need to change, as you would have probably guessed.
This .header is called from my header.php file by <div class="header">
Now...?
1. Rename your style.css file to style.php, then add the following to the top of the file:
<?php header("Content-type: text/css"); ?>
This line tells the browser that the file is CSS instead of HTML.
2. In your HTML files, change the stylesheet references from style.css to style.php. For example:
<link rel="stylesheet" type="text/css"
media="screen" href="style.php">