Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Right justified equation numbers w/o tables
December 14, 2004, 1:53 am
rate this thread
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.
font : bold larger "Courier New", Courier, monospace;
color : Navy;
margin : 6px 8% 6px 8%;
width : 100%;
font : normal italic "Times New Roman", Times, serif;
color : Maroon;
<div class="math">P = B + C<span class="eqno"></span></div>
- Adrienne Boswell
December 14, 2004, 4:28 am
- Jukka K. Korpela
December 14, 2004, 12:48 pm
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%">
<th align="right" valign="bottom">(number)</th>
I just wrote some additional notes on this:
Yucca, http://www.cs.tut.fi/~jkorpela /
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
- » Re: updated version of menu.....convert to z-index?
- — Next thread in » HTML Markup Language