HighDots Forums  

vertical-align on span that resides inside a table cell

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss vertical-align on span that resides inside a table cell in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default vertical-align on span that resides inside a table cell - 12-16-2003 , 05:28 PM






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

Reply With Quote
  #2  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: vertical-align on span that resides inside a table cell - 12-16-2003 , 06:22 PM






*kAldam* <x_men24 (AT) hotmail (DOT) com>:
Quote:
style="position:absolute;top:190;left:184;"

style='height:11;width:100;;background:#8a2be2;fon t-family:Arial;font-size:1
0;
Quote:
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.


Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: vertical-align on span that resides inside a table cell - 12-17-2003 , 01:45 PM



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 <crissov2003Q4 (AT) gmx (DOT) net> wrote

Quote:
*kAldam* <x_men24 (AT) hotmail (DOT) 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 ':'.

Reply With Quote
  #4  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: vertical-align on span that resides inside a table cell - 12-18-2003 , 02:21 PM



x_men24 (AT) hotmail (DOT) com (kAldam) wrote:

Quote:
Ever considered looking at the problem at hand,
If you cannot behave (the Usenet way), why should we help you for free?

Quote:
For anyone else, interested in a solution to this problem.
I don't thin I'm interested in your "solution" to your problem.

Quote:
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/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.