This guy hates CSS,
and that’s hardly surprising once you’ve seen this. This
guy hates these guys, mostly
because they’re busy taking this
and getting all Mary
Shelley with it (an analogy that is not
wildly inappropriate) and it ends up looking like this anyway.
Me, I’m not that demanding. I’m a pretty simple guy. A reader wrote me
today and said “Sixteen points of font seems excessive. Why not let the
browser defaults kick in, and let people decide for themselves what
they’re happy with?” Totally reasonable, so I did that. It’s pretty
much all the same size, except for my name up in the corner there,
but that’s just some big percentage bigger. I can live with that. I
made the line-height 120% of the font height, just to unclutter things
a little and make it easier to read, but that’s it.
He went on, though, to ask me to do the same thing for the sidebar –
size it automatically, as a percentage, rather than the fixed 180px
width, and I said I’d get back to him – how to properly muck around
with percentages, anchor points and “width: auto” style tags one of
those things that’s supiciously absent from the nearly-illegible spec,
and my kung-fu in this field is not all that powerful.
Still, it’s not an unreasonable request; two columns, one as narrow as
possible (width: auto; takes care of that, no sweat) and the
next one immediately adjacent, and flowing to the other side of the
page. It’s that middle bit, the “immediately adjacent” bit, that as
far as I can tell is precisely impossible. Not “impossible”, strictly
speaking, but not CSS-possible. Tables will do it. Grab a fistful of
markup tags that have worked right since electrons-on-phosphor supplanted
elk-femur-on-head as the preferred primate-compliant interface, set
borders to zero and phasers to stun, yo Joe. I can’t seem to shoehorn
divs into tables, but that’s probably my fault.
But with this newfangled, high-tech CSS? No
way. All the examples I can find, even the BlueRobot
folks, have to throw in the fixed-pixel-width columns and fixed (and
usually damn near subatomic) font sizes. What I really want, I think,
is to be able in a stylesheet to refer to a completely different
attribute in a previously cascaded style section and
perform
basic math with it. Even basic math on its own would be
nice. Say, left: .sidebar->right + 2; or left: 22% +
2;, or something a lot like that. Maybe I’m just using the existing
tools wrong, but without fixed-width divs, I’m just not sure how to
keep a nice clean left-right fit and accomodate wildly variable font
sizing at the same time.
Nesting the div tags in some span tags, maybe? Urk. That can’t be
right. Seems like a lot of effort for something that would have worked
fine with some forgivable <table> abuse back in, oh,
1992.
Apropos of nothing, today the fortune program on my machine told me
the following joke:
“How many mathematicians does it take to screw in a light
bulb?”
“One. He gives it to six Californians.”
I’ve been chuckling to myself all day. I’m such a geek.