Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

vertical-align and SPAN's

0 views
Skip to first unread message

Robert Adams

unread,
Aug 7, 2001, 10:34:23 AM8/7/01
to

The Micorosoft online documentation states that "vertical-
align" works with SPAN's
(http://msdn.microsoft.com/library/default.asp?
url=/workshop/author/dhtml/reference/properties/verticalAli
gn.asp)... But the following code does not:

<span id="editlist"
style="{background:#990033;height:30px;width:184px;vertical
-align:middle;text-align:center;}">edit list</span>

The text within the SPAN still appears on the top of the
box. Is there something i'm missing, or is this an
umimplemented, yet intended, feature?

Any idea when it will operate according to specification?

.robert adams
webm...@egoz.org

jop

unread,
Aug 22, 2001, 8:15:36 AM8/22/01
to
Microsoft says:
The sub and super values are supported on text. The auto value is
supported on the currentStyle object. The other values are supported
on objects that support VALIGN.

Since span tag does not support valign you wont be able to use that
style to align your text.

however you might want to try this:
< div style="height:100>
< span style="position:relative;top:expression(parentElement.offsetHeight/2
- offsetHeight/2)" >your text here.< /span >
< /div >

of course it probably ony works on ie5+

0 new messages