There comes a time when we move from doing something because it’s fun and exciting to actually having to make some money with it. We all remember the joy of walking the DOM for the first time, challenging the first-child to a match of borders, or even playing peek-a-boo with our precious little title attribute. But when does that playful joy turn into a realization that money sits behind them there divs?
Looking back fondly
Several of the standardistas out there have been sharing their joyful memories of their ventures into the big ol’ world of moolah with nary but a Dreamweaver on their back. Great advice is out there for the pickins. Sure there’s a mixture of demanding bosses, forever late paycheques, and brain-dead art directors. But ah….the glory of it all.
Yes, my dear… there is a big world of hacks out there for you to climb. Grab a friend and start climbing, for soon enough you will be on top and have the opportunity to reach down and pull someone else out of the valley of the table-goo. Ask questions and begin providing answers. Maybe next year, you will be the star on top of the standardista chrismahanakwanza tree.
While it is no longer “stop the presses” newsworthy to see a site launch with a standards-based design, it still makes me giddy.
I went to Expedia this morning to look at airfares and got a placeholder page announcing an upcoming re-launch. Mere minutes later, the site was up and running. I haven’t seen anything revolutionary on it yet, lets see how she roars.
I had a challenge today to create a table with a fixed header and foot. My first reaction was… oh no…. I pictured all sorts of hacks to make it work. I tried position: fixed, I tried extra divs, I tried this, I tried that, I even prayed to the Venus of Willendorf statue on my desk for a solution. When all else failed, I turned to the best resource for standards-based programming, my mother. Above the din of the Jerry Springer show on television, she yelled “What the hell do I know about tables?”
With Mom and my Venus drawing blanks, it was time to hit the message boards, the Standardista search, and Yahoo! Fortunately, Scott Swabey found this really cool approach: Fixed, Non-Scrolling Table Header and Footer by Brett Merkey.
Thinking Outside the Box
It’s pretty simple. Place the table in a div with overflow:auto. Then use absolute positioning to move the thead and tfoot outside the div. Voila, scrolling body with the thead and tfoot static.
Now, I can sleep happily knowing that the table can scroll, the venus has made me pregnant, and my mom was able to finish watching “I slept with my brother’s teacher’s husband!”