Menu
Can I define a constant in CSS that will set attributes used later?
For example:
[code=php]
<style type=”text/css”>
CHIGH = 100;
CWIDE = 100;
Csrc = ‘picture100.gif’;
/* alternative settings for different application
CHIGH = 200;
CWIDE = 200;
Csrc = ‘picture200.gif’;
*/
#var_img {
height:CHIGH;
width:CWIDE;
}
</style>
…..
<img id=’varimg’ src=’picture100.gif’ alt=”small image”>
…..
Or do I need to define specific functions in JS to alter the attributes?