[Pmwiki-users] Styling simple table rules

Patrick R. Michaud pmichaud
Thu Dec 9 14:14:42 CST 2004


Sorry, I can't help showing off a bit today.

For Ciaran, tables with the first row styled differently.

   http://www.pmwiki.org/wiki/Test/FunWithTables#firstrow

On Thu, Dec 09, 2004 at 01:40:52PM -0500, Bronwyn Boltwood wrote:
> I'd love to have a table colour scheme with a header and alternating
> rows!  

Oh.  How about ...?
    http://www.pmwiki.org/wiki/Test/FunWithTables#zebra 

Or if two colors isn't good enough...
    http://www.pmwiki.org/wiki/Test/FunWithTables#zebra4

> (Columns too, but I don't see a good way to reliably produce
> that.)  

Why not?
    http://www.pmwiki.org/wiki/Test/FunWithTables#columned

Or if you need both rows and columns:
    http://www.pmwiki.org/wiki/Test/FunWithTables#xhatch

> Can we have a toggle to mark the first row of a simple table
> as proper header row with <th>s, too?  

Just use the ||!heading|| markup, as you later discovered, and
demonstrated in 
    http://www.pmwiki.org/wiki/Test/FunWithTables#zebra 

> Can I have this in time to write styles for it into a template for v2 final?

Sure, the capability is now in beta8 (although it's not configured by
default -- you have to set $TableCellAttrFmt and/or $TableRowAttrFmt.
Details to come in a cookbook recipe.

> Another super-nifty trick would be to highlight a row when a user
> clicks on it or hovers over it, like
> http://www.alistapart.com/articles/tableruler/.

Oh, alright....
   http://www.pmwiki.org/wiki/Test/HighlightRows

:-)

Pm



More information about the pmwiki-users mailing list