a css zen garden
The last couple of weeks, I've been teaching myself cascading style sheets. If you don't know what they are, you're not alone. I sent some friends a link to an amazing site that shows off what can be done with CSS if you have some artistry in you. The site shows a single Web page like this one, coded, as this one is, in html. And it's linked, as many Web pages are, to a CSS file. It's quite a lovely design, but the interesing thing is that you can click on a link and get the same page with a different CSS file, and the page turns out radically differently. My wife said, "Well, all they did was just change the fonts and pictures. You can do that, right?" Jason said something like, "I've heard of that site, and know it got a bunch of awards, but I have no knowledge of cascading style sheets, so." Paul S, finally, said, "Holy schmoly, that's amazing!" Or something like that.
Whenever you change a background color or font size or table size or anything formatty about your Web site, you have to change it on every page, naturally. Or, you had to until several years ago when they invented style sheets. This isn't too bad if you have batch editing, where you can change, say, the phrase "Barry sucks" into the phrase "I love Barry" in every single document in a folder with one stroke — something you still can't do in Word, Notepad, or any Windows program I know of. (How do you Windows people stand it?)
Well, anyway, the easier thing to do is to have a style sheet, which specifies all that stuff for your entire site. This way, you go into one file, and change all your link colors from blue to red, or all your fonts from Times Roman to Arial. Say it once, and your whole site's changed. And furthermore, you can control your placement of things so that the site looks the way you want it to without cheating, which a lot of us still do. On this site, for instance, my code for the home page, though I'm proud to say is pretty elegant, is still not as elegant as it could be if I could figure out how to do it in CSS.
Font sizes? Colors? Placement? Who cares, you ask. Just for fun, check out the page I sent: csszengarden.com.
Whenever you change a background color or font size or table size or anything formatty about your Web site, you have to change it on every page, naturally. Or, you had to until several years ago when they invented style sheets. This isn't too bad if you have batch editing, where you can change, say, the phrase "Barry sucks" into the phrase "I love Barry" in every single document in a folder with one stroke — something you still can't do in Word, Notepad, or any Windows program I know of. (How do you Windows people stand it?)
Well, anyway, the easier thing to do is to have a style sheet, which specifies all that stuff for your entire site. This way, you go into one file, and change all your link colors from blue to red, or all your fonts from Times Roman to Arial. Say it once, and your whole site's changed. And furthermore, you can control your placement of things so that the site looks the way you want it to without cheating, which a lot of us still do. On this site, for instance, my code for the home page, though I'm proud to say is pretty elegant, is still not as elegant as it could be if I could figure out how to do it in CSS.
Font sizes? Colors? Placement? Who cares, you ask. Just for fun, check out the page I sent: csszengarden.com.
Comments