Creating Dynamic Styles with Dynamic HTML

The term dynamic styles was coined by Microsoft to denote the aspect of Dynamic HTML that encompasses using JavaScript to dynamically assign style properties to elements based on the W3C's DOM (or Document Object Model). Dynamic HTML is not a specific technology, but rather the interoperation of three technologies: CSS, JavaScript, and the DOM. Through the DOM, programs and scripts can access, change, delete, or add any object within a document.

The methods shown here for creating dynamic styles work in the following browsers: Netscape 6 and Internet Explorer 4 (or greater). They do not work in Netscape 4 (or earlier) or in Opera 5. Ultimately, however, as more browsers support the W3C's DOM, support ...

Get Cascading Style Sheets (CSS) by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.