GuyWithDogs
02-15-2005, 03:11 PM
Is it possible to redefine a style at runtime?
For example, assume I have a definition
img {
height: 100%;
}
When a page loads, I'd like to redefine the images to be 75% of the available body height.
I created a routine that I execute in the onload() event to change each image to a calculated height - I'm wondering whether there's a better, or more generic, way to do this.
For example, assume I have a definition
img {
height: 100%;
}
When a page loads, I'd like to redefine the images to be 75% of the available body height.
I created a routine that I execute in the onload() event to change each image to a calculated height - I'm wondering whether there's a better, or more generic, way to do this.