Re: 1px line between table rows (css/IE/Moz)



Scripsit Nik Coughlin:

What other way do I have to get two lines separated by a 1px line in
IE as well as in Moz?

Apply the border to the cells instead.

Yes, that works much better.

However, if we are a little worried about text-only presentation and non-visual rendering, as I think we should, we have a problem. The user would see or hear
First line
second line
with no indication of this being (presumably) a mathematical fractional expression. Using a summary="..." attribute helps, but only in part.

Therefore, you might consider the following slightly tricky approach:

<table class="operation">
<tr class="frac"><td>First line</td></tr>
<tr><td valign="middle"><img src="1px.gif" alt="divided by"
width="100%" height="1"></td></tr>
<tr><td>second line</td>
</table>

Here 1px.gif is a single-pixel image, of the color desired for the horizontal line. When rendered as plain text, or spoken, this becomes
First line
divided by
second line

Some more notes on "two-dimensionality" of formulas:
http://www.cs.tut.fi/~jkorpela/math/#twodim

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

.