Modifying the Look and Feel of Individual Elements with Multiple Style Sheets
(Page 1 of 4 )
Learning how to control multiple style sheets using both client and server side scripting can be a significant addition to the toolkit for many web designers taking their first steps into this huge terrain. If you're interested in mastering this topic as painlessly as possible, this series of articles might be what you're looking for.
Introduction
Welcome to the final tutorial of the series that began with "Working with Multiple Style Sheets." Made up of three articles, this series shows you how to deal with multiple style sheets attached to a selected web document by using some easy-to-follow JavaScript code, and it complements all of the theoretical concepts with instructive code samples.
As you saw in the preceding article of the series, manipulating a bunch of different style sheets via client-side scripting isn't as complex as it seems to be at first glance. Of course, having the capacity to change the styles of certain elements of a web page doesn't imply that you must always provide users of a web site with this feature. If you wish to give them an additional level of customization, however, you might find this approach quite useful.
It's fair to say that swapping several style sheets is indeed a no-brainer process, which can be tackled by utilizing several approaches. In this case, I decided to show you how to perform this task by means of some basic JavaScript code. As you probably know, the same results can be obtained with a server-side scripting language, which introduces an additional advantage: this method is completely independent of client-side scripting.
In either case, hopefully after reading the two previous articles of the series, you'll have a good idea of how to work with multiple style sheets to modify the look and feel of a given web page. Nevertheless, all of the approaches shown so far relied heavily on switching entire CSS documents. Thus, assuming that you're already familiar with this process, this last installment of the series will be completely focused on altering the styles of individual elements of a web document without the need to swap the full style sheet.
Now that you already know the subject of this final article of the series, come along with me and learn how to modify the styles of certain sections of a web document without replacing complete style sheets. Let's begin now!
Next: Swapping entire persistent style sheets >>
More Style Sheets Articles
More By Alejandro Gervasio