[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternate look of email listing in Mhonarc



Good news!!! CSS supports odd/even.

"One way to improve the readability of large tables is to color alternating rows. For example, the table below has a light gray background for the even rows and white for the odd ones. The rules for that are extremely simple:

tr:nth-child(even) {background: #CCC}
tr:nth-child(odd) {background: #FFF}"

Bad news :-( most browsers don't support nth-child

"Warning: at the time of writing (February 2003), the major browsers don't yet support the 'nth-child' selector (introduced in November 2001) and only very few support the COL element."

  Even and odd rules
  http://www.w3.org/Style/Examples/007/evenodd.html


However, you can get odd/even coloring with a bit of XSLT. If you set up MHonArc to generate yor index page as XHTML, you can use the first tip in this article to get even/odd coloring
Improve your XSLT coding five ways
http://www-106.ibm.com/developerworks/library/x-xslt5.html


Gary

Earl Hood wrote:
On March 28, 2003 at 09:17, mark david mcCreary wrote:


When a Mhonarc pages displays a long list of email dates and subject lines,
it might be useful to provide alternate color background shadings to help
easily distinguish the different lines.


There is no built-in way to get what you want.


Using CSS stylesheets, it might be possible to assign CLASS to the line
item elements.  However you would need at least two different CLASS values.
One for a light shading, one for a darker shading for instance.

Are there any variables that can be used to at this point that would have
the value of the row number.  That is, if you could take the line item row
number, and divide by two, to get even or odd, it might be possible.


There is the $ORDNUM$ resource variable, but no mathematical based
operations are supported to get something like an even/odd output.

--ewh

---------------------------------------------------------------------
To sign-off this list, send email to majordomo@mhonarc.org with the
message text UNSUBSCRIBE MHONARC-USERS


---------------------------------------------------------------------
To sign-off this list, send email to majordomo@mhonarc.org with the
message text UNSUBSCRIBE MHONARC-USERS


[Index of Archives]     [Bugtraq]     [Yosemite News]     [Mhonarc Home]