Blog templating

Well, I’ve finally gotten around to changing the base template for this blog to more closely match the rest of the site post-redesign.

Tweaks to come; it is vastly improved, I think…

[Couple of hours later]

Yeah, of course I hosed some settings during the republishing process, and had to redo a style sheet.

I don’t know, I really like CSS but it is limiting in some ways.

For example:

  • Having worked with tables for years, I know all the ins and out there. DIVs just don’t work as well, in many cases. Example: Say you have a two-column display, and you want (short) column 1 to have a red background, and (longer) column 2 to have a white background. With a table that’s easy — the longer column pulls the short one down with it, and one set’s the background color (in whatever fashion you want: bgcolor= or CSS) in the TD tag. With a DIV, it behaves much like an image: The color ends in the short column when column 1’s contents are done, and then column 2 begins to wrap around the bottom of column 1. Yes, but messing with position you can fix the wrapping, but the color can only be handled by nesting the two divs in a parent div or setting a background color for page that will be column 1’s — the short column’s — color. Just very awkward.
  • It’s probably [yeah…] my ignorance, but is there a way to extend IDs like classes for pseudo-ID’s. For example, the class “smallText” can have link properties by appending the class name to a new pseudo-class: A.smallText:hover blah blah… I can’t seem to get the same to work for IDs, and I don’t see anything about it.
  • Style sheets are a lot like HTML: Very easy to learn, cool that it works, but very hard to master. There are very subtle things going on that, when one first begins, one invariable hoses. It’s a neat tool, however, don’t get me wrong.
  • There is no
    equivalent
    . That hurts. Sure, one can do a DIV ALIGN=center, but that really doesn’t do the same thing in many cases. I think part of it is that I’m still in the old HTML mode (tables etc), so it’s not intuitive and all. But it seems like more work to, for example, to center a search box over a page, one has to used two DIVs: One to center the box, the other to create the box. With a table, you do an “align=center” in the table (which did not affect the table contents). That’s not the end of the world, but that means that — for every style sheet you write — you have to “build” a fake center tag (ID with width auto) so one can use it. Maybe I’m just missing something, but the CENTER tag is a good one that should be build in.
  • And – needless to say – the differences in browsers makes CSS a pain in the ass. And I’m not even counting browsers like Netscape 4.x, which barfs on all this stuff. I’m talking about so-called “standards compliant” browsers. Fortunately, things are SO MUCH better than they used to be in this respect. Now it’s more of stabilizing the code instead of writing two/three sets of it.

All that said, I love CSS. It’s great to quickly update the look and feel of site with one file in most cases (sometimes have to add class/id info to links or whatever).

For example, I hosed my update up because I had link color issues (that’s another rant, but whatever….). But once I identified the problem, it was easy to just extend a couple of classes and I was in business. Very simple.

That’s powerful.