Forum Moderators: not2easy

Message Too Old, No Replies

Unexpected CSS Benefit when printing

Have you had any pleasant css surprises?

         

treeline

11:23 pm on Feb 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've been painfully trying to reform my font-intensive nested table habits, based on recommendations here. It's frustrating relearning something that was second nature. Accessibility wasn't a compelling draw, but leaner files, easier updating, and quicker rendering eventually convinced me.

So I redo some data-intensive tables (no really, I neeeeed these tables)(it's tabular data, OK?)(they're not nested anymore)(come on, can't you spot me one little table?) to have <thead> <tbody> and <th> tags, mostly to cope with targeting different fonts in the absence of <font> tags. The size of these tables is highly variable and unpredictable, so they often print across page turns.

What to my wondering eyes should appear, but the table headings repeat at the top of every page, all nice and automatic like. In the heading fonts and everything. I love this, makes the second page so much easier to read. Who'd a thunk it?

Have you had any unexpected rewards in your struggles with converting to css? Any cool new tricks like this for me?

Thanks!

DrDoc

6:29 am on Feb 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tables aren't bad. :) I use tables all the time. They just don't belong as main layout defining elements.

But, yes, isn't it exciting to find out these kinds of things? So, imagine this: define thead and tbody ... Then limit the height of tbody and set overflow to auto. What do we have? A scrollable table with headings that stay put.

MWpro

6:48 am on Feb 3, 2006 (gmt 0)

10+ Year Member



So, imagine this: define thead and tbody ... Then limit the height of tbody and set overflow to auto. What do we have? A scrollable table with headings that stay put

That is a fantastic idea, good thinking.

DrDoc

7:09 am on Feb 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If only that worked flawlessly in all browsers. Heck, if only it worked flawlessly in IE and FF :)

That's not to say that it can't be done. It's just a little trickier than it first would seem. But, there are a couple examples online if you google for them.