CSS Primer: To Infinity And Beyond
Thursday, August 31st, 2006For the last entry in our CSS Primer, I want to highlight ways in which CSS can be extended to create even more advanced effects. As a refresher, we've already covered the basics, like why CSS should be used, the basic elements used for CSS layout, placing DIV elements and styling them with backgrounds and borders, and manipulating fonts via CSS. So today, we'll focus on "what's next"…
The next step in extending the HTML and CSS design structure is called Dynamic HTML (DHTML). In addition to using HTML and CSS, DHTML also incorporates the use of JavaScript to create events for elements. For example, if you wanted to create a multi-leveled menu in an expandable tree structure, you could accomplish this through DHTML, whereas this would not be possible with HTML and CSS alone.
The addition of the Javascript allows you to respond to certain events (clicks, hovering, etc.) by manipulating the properties of an HTML element on the fly. An image gallery is a great example of this. We could create an image gallery with one big image on top and all the thumbnails below. Then on each thumbnail, we could place code that would change the image being displayed in the big image area when the thumbnail was hovered over.
DHTML is also extremely flexible, so I can't possibly even begin to scratch the surface of everything it can do. It's only limitations are your coding ability and the capabilities of JavaScript. However, that can also make it difficult to learn.
However, there are a number of sites that offer collections scripts that can be used to accomplish almost anything you'd like to do. Some I'd recommend are:
Instead of trying to go into any more details, I'm going to put a cap on our CSS Primer right there. There is a lot of power in the use of CSS and HTML (which grows exponentially with the addition of JavaScript) that I encourage you to explore if you haven't already. Heck, there's even a lot of powerful options that were too much for me to even cover here. Even if you're a seasoned web design vet, there's something more that can be learned. But isn't that always the case?
After a month of voting, our third poll has shown that there is definately a breadth of experience among our readers. However, more than half of your are what I'd call "seasoned vets" with 3-10 years of experience of working on the web. That's where I fall myself, so I find that interesting.