CSS: The Adventure Begins
I've been reading a lot about CSS, lately, especially since my web site template came with one. I've modified it, some, but I haven't done anything very interesting. The template used tables for page layout, so I was adding, deleting, and modifying table rows and columns till the cows came home. At the time it didn't seem overly tediuous, but that was before I began learning about CSS "float" and the properties that can be applied to <div> tags. Ahem! Very quickly it has become apparent that all the table crap can be replaced with CSS.
Why do I care? Even more relevant, why should you care?
Using the <table>, <tr>, and <td> tags places a lot of HTML "cruft" in the content that's not at all related to the "content". Tables are not text; tables are not images. Text and images are our content, and our HTML files should (primarily) contain the content. "We're only interested in the content, ma'am. Let's stick to that." CSS defines the layout. The presentation. Our modern multi-tiered application development wisdom says that presentation and business logic should be separated into distinct "layers" so that one can be changed without affecting the other. In any business application, the "business logic" is the meat, and the UI is just the "fluff" that's needed only to please the user. But of course UI is important, or we would still be using god-awful ugly green screens filled with cryptic codes and unintelligible instructions.
So (and not to overly tax my metaphor), if I care about the content of my web site (and I do), then I should worry more about what's there, as opposed to what it looks like. Of course, I do worry about how it looks, because if it looks terrible, no one will want to visit it. Ugly guys don't get dates (except from blind girls). IMHO, the building and maintenance of the web site content should consume a greater portion of time than does the maintenance of the look-and-feel. That's because content is universal and enduring. UI "fluff" is a flag whipping in the winds of change. And above all, I'm a substance over appearances kind of guy.
How's that?
So, what am I saying? Only this: I plan to redo my site using CSS for almost all the formatting (probably all of it can be done with CSS); eliminate the tables (they're so 90's, after all); and make the whole site arguably a breeze to modify as time goes on. As a creative person, my tastes and latest ideas change rapidly, so perhaps my web site should change to suite the desires of the moment. Yes, indeed. Perhaps it should.
BTW, if you are interested in CSS, here are a couple of links to places that the CSS novice should go: http://csszengarden.com/ and http://www.w3schools.com/css/default.asp. The CSS Zen Garden has links to many sites offering CSS tutorials, tips and tricks, and discussions of all the bugs prevalent in today's "modern" browsers. Think IE is perfect? *Ahem*
Well, that's all I have for now. Stay tuned, this may get more interesting before it becomes less interesting.


0 Comments:
Post a Comment
<< Home