Improved the knotes print stylesheet and worked-around an MSIE centering bug

28-October-2005

email this
I spent ages early this morning making improvements to the default knotes print stylesheet. Tough work, made harder by certain unmentionable browsers. I also added a new work-around for the content-area centering problem in Internet Explorer ( body {text-align:center;} + #wrapper {text-align:left;} )

I've been wanting to do something about the print stylesheet in knotes or some time now. It's been functional and accessible, but far from pretty. But print styling is tough work, tricky to judge and hard to test.

Early this morning I started work on the issue, and after 5 hours or so it looked OK I think: I'm never confident about accessibility issues in print styling. But then it took another 2 hours fiddling to test it in Internet blinking Explorer, which did not want to purge the cached style. If you already have the stylesheet cached you may not see the changes except in my re-skinning testbed at elearning2.0. I'll step up the version numbering of the stylesheet across the product (to force the changes past caches) when I get a chance over the weekend. I think the new print style is quite usable: pretty but readable, stylish but accessible, totally generic.

I even did a bit of experimenting with using after: CSS2 to write in the urls for links and cites, but ran into weird problems so rolled that back. I'll have a look at offering a javascript/dom script to turn urls into footnotes when I've finished styling comments for screen and print (see my css/print tag for links).

I also got round to 'fixing' the problem whereby Internet Explorer would ignore the #wrapper{margin:0 auto;} rule and fail to center the main content area of the blogs. I didn't have time to chase down a real solution so I set the text-align of the body element to center, and the text-align of the wrapper div to left. Since in knotes ( and MT2 ) markup, the wrapper div is the only important child of body, this does the job just fine. In fact I'm perplexed ( and worried ) that I have not seen that workaround used before. Am I missing something I wonder? ...sigh : CSS really is a dark art :o)

Mike Malloch; 28-October-2005 15:13:25; forum (0) help

Comments please

If you are already registered here, please click the "Login" button to send your username/password with the comment. Click the "Anonymous" button to leave a comment without logging in.

Please tell us who you are

E-Mail Address (Required)
We need a valid email address in order for you to post a comment. You will recieve an email containing a special validation link. The comment will not be published until validated
Name
Please leave your name
Title
Lead-in
Body Text ( HTML tags are allowed )
Validation
Please enter the text from the image above
Preview your comment

Linking and trackbacks

When linking to this weblog entry, please use the 'permalink', which is http://www.knownet.com/Members/mmalloch/blog/entries/4339396534

Some weblog systems will ask you for a "trackback link" (most systems will find this special 'hook' automatically, in the code for this page).

The trackback link for this entry is http://www.knownet.com/Members/mmalloch/blog/entries/4339396534/tb