Bryan Lawrence : Bryan's Blog 2005/02/25

Bryan Lawrence

... personal wiki, blog and notes

Bryan's Blog 2005/02/25

XHTML Table Alignment

Leonardo purports to produce xhtml1.1, so I decided to do some work on validating my pages (with the new underlying wiki format). It turns out that table alignment was one of two big problems (and a few minor ones) for me to resolve (the other one is that images can't exist in paragraphs, I have yet to solve that one - it requires real work in my wiki parser).

I used to use <center> but that didn't validate (even though it worked). So, given it took some finding (thanks), I've repeated it here: To center a table in xhtml1.1, you need to put it in a div of some sort, and, use the margin and text-align attributes. Here, for example is the piece of my css that works for the "main" part of the Leonardo layout:

div#main table {
   margin: auto;
   border           : thin solid black;
   background-color : #FFFFFF;
   text-align: center;
}

I had hoped this would fix the Internet Explorer problems I've had (well, strictly, the Internet Explorer problems others have had!) - but it didn't. I'm sorry IE folks, don't blame me, blame Microsoft ...

(The latest version of my wiki and embedhandler that are closer to xhtml1.1. compliance are at corewiki.tgz)

by Bryan Lawrence : 2005/02/25 : Categories computing (permalink)

M2Crypto Woes

Guido (he of python fame), has a rant about M2Crypto. This is a worry from an NDG point of view. In it he also makes the following comment about SWIG as well:

... I've yet to see an extension module using SWIG that doesn't make me think it was a mistake to use SWIG instead of manually written wrappers. The extra time paid upfront to create hand-crafted wrappers is gained back hundredfold by time saved debugging the SWIG-generated code later.

We've only been exposed to SWIG in a big way once, and it was a nightmare. The code involved worked on one platform, not on another, on same days, and not on others. Repeatable problems they weren't ... but to be fair, in that case it might not have been SWIG's fault, but then, we couldn't tell!

by Bryan Lawrence : 2005/02/25 : Categories python computing (permalink)


DISCLAIMER: This is a personal blog. Nothing written here reflects an official opinion of my employer or any funding agency.