
/* Lifted, with slight modification, from
  http://www.w3.org/People/mimasa/test/schemas/NOTE-ruby-implementation#css2-inline-table
*/

ruby { display: inline-table; }
 
ruby * {
	display: inline; 
	line-height: 1.5; 
	text-indent: 0;
	text-align: center;
	white-space: nowrap;
}
ruby > * {
	display: table-row-group; 
}
ruby > rt, ruby rtc {
	display: table-header-group;
	color: #770; background-color: #fff;
}
ruby rtc + rtc { display: table-footer-group; } 
ruby rbc > *, ruby rtc > * { display: table-cell }

/* this only works when an rt spans across all rb */
ruby rtc > *[rbspan]
  { display: table-caption; margin: auto; }

/* ajf notes that the default position of table-caption
  is "caption-side: top", which is correct for the first
  instance of rtc but not the second.  In theory the 
  following selector should fix that.  Unfortunately, when
   tested, it doesn't seem to do anything useful,
   neither on Opera 8.52 nor on FF/Moz/Seamonkey.
*/

ruby rtc + rtc > *[rbspan]
  { caption-side: bottom; }

ruby rp { display: none }


/* adjustment for benefit of IE */
rt { font-size: 75%; }



