By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,648 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,648 IT Pros & Developers. It's quick & easy.

vertical-align on span that resides inside a table cell

P: n/a
I am currently using IE 6.0 and 5.5 and the scenario is the following.
I have a span that contains text, and the span is beign contained by a
table cell (this is the way thing need to be in my application). I
have an issue when the span has a heigth less than 18px (meaning
height of the span, there is only one line of text and the height of
the text is less than 18). The issue is that I start getting a
padding, I add a color background to the span to see how height the
span is, the table cell can not get less than 18px (to simplify the
table, it is a table with no height, only one row, only with one cell
that has no height). Inside the span, I defined the style to be
vertical-align:top, but when I remove the vertical-align the padding
goes away. However, I need the vertical-align on the span.

My table looks like this

<table border="0" cellpadding="0" cellspacing="0"
style="position:absolute;top:190;left:184;" >
<tr>
<td bgcolor="aqua">
<span style='height:11;width:100;;background:#8a2be2;fon t-family:Arial;font-size:10;font-weight:400;;position:relative;display:inline;verti cal-align=top;'>Mi
text</span></td>
</tr>
</table>

Does anybody have an idea why having the vertical-align:top (I tried
also vertical-align=text-top) would add bottom extra padding to the
cell?

Thanks,

P
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
*kAldam* <x_*****@hotmail.com>:

style="position:absolute;top:190;left:184;" >
style='height:11;width:100;;background:#8a2be2;fon t-family:Arial;font-size:1
0; font-weight:400;;position:relative;display:inline;verti cal-align=top;'>


Ever considered using correct syntax before asking further going questions?
You used no units at all and one time an '=' instead of a ':'.

--
To the optimist, the glass is half full.
To the pessimist, the glass is half empty.
To the engineer, the glass has an appropriate reserve space.
To the economist, the glass is twice as big as it needs to be.
Jul 20 '05 #2

P: n/a
Ever considered looking at the problem at hand, rather than looking at
what people are wearing at the meetings? ..and yes, I did a typo when
trying to post this article, in the hopes that somebody with enough
experience will answer asap.
For anyone else, interested in a solution to this problem. Apparently,
the container ( in this case the table cell) seems to have a default
text height, so even thought I set the font size in the contained item
(the span), the table cell will create the extra space because of its
default height. Giving a font size to the table cell in this case will
solve this behaivour.
Christoph Paeper <cr***********@gmx.net> wrote in message news:<br***********@ariadne.rz.tu-clausthal.de>...
*kAldam* <x_*****@hotmail.com>:

style="position:absolute;top:190;left:184;" >

style='height:11;width:100;;background:#8a2be2;fon t-family:Arial;font-size:1
0;
font-weight:400;;position:relative;display:inline;verti cal-align=top;'>


Ever considered using correct syntax before asking further going questions?
You used no units at all and one time an '=' instead of a ':'.

Jul 20 '05 #3

P: n/a
x_*****@hotmail.com (kAldam) wrote:
Ever considered looking at the problem at hand,
If you cannot behave (the Usenet way), why should we help you for free?
For anyone else, interested in a solution to this problem.
I don't thin I'm interested in your "solution" to your problem.
Apparently, the container ( in this case the table cell) seems to
have a default text height, so even thought I set the font size in
the contained item (the span), the table cell will create the extra
space because of its default height. Giving a font size to the
table cell in this case will solve this behaivour.


You appear quite confused, and the above confirms it. Should you ever
wish to participate in Usenet discussions constructively, try to learn
how to post to Usenet and how to get your CSS syntax right and how to
post the URL of a demo so that your problem can be seen in context.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.