Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Subject
- Posted on
- Right justified equation numbers w/o tables
- 12-14-2004
posted on
December 14, 2004, 1:53 am
December 14, 2004, 1:53 am
numbers on the same line as the equation but I cannot seem to find a
way of doing this w/o tables, which is really a PITA. I tried
everything I can think of in the Span styles but since I cannot get to
specify a width as "all the remaining space", it doesn't seem to work.
Is there no way of doing this w/o tables? Thanks.
DIV.Math {
font : bold larger "Courier New", Courier, monospace;
color : Navy;
margin : 6px 8% 6px 8%;
width : 100%;
}
SPAN.EqNo {
font : normal italic "Times New Roman", Times, serif;
color : Maroon;
???
}
...
<div class="math">P = B + C<span class="eqno">[3]</span></div>
Re: Right justified equation numbers w/o tables
Well, not quite. What happens if the equation itself gets divided into
two or more lines?
The problem with that is that floating makes an element a block
element. If you put the equation number before the equation in markup,
you could make it float to right the intended way - but only when the
equation fits onto one line. Dealing with potentially multi-line
equations makes things tricky. Positioning is one approach but then you
have problems with old browsers like IE - they don't do positioning
well in other than fairly simple cases.
So a table _is_ the practical solution, and not necessarily illogical:
<table class="eq" summary="Equation and its number." width="100%">
<tr>
<td>the equation</td>
<th align="right" valign="bottom">(number)</th>
</tr>
</table>
I just wrote some additional notes on this:
http://www.cs.tut.fi/~jkorpela/math/#eqno
--
Yucca, http://www.cs.tut.fi/~jkorpela /
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
Site Timeline
- » Re: updated version of menu.....convert to z-index?
- — Next thread in » HTML Markup Language
- » Great place for grahics
- — Previous thread in » HTML Markup Language
- » Adblock Testscript problem
- — Newest thread in » HTML Markup Language
- » Adblock Testscript problem
- — The site's Newest Thread. Posted in » HTML Markup Language