Table query


K

KiwiBrian

What is the best way of individual defining/controlling the vertical
positioning of (say) 4 seperate text entries in a table cell?
It must be cross-browser compatible.
My research indicated that if I applied a style of position: relative to the
first text entry, then I could apply position: absolute to the others.
Did not work for me.
Trying to make the table cell position: relative behaved differently between
IE7 and FF.
Assume that the table cell will not have its size changed by other cells in
the same table.
 
Ad

Advertisements

T

Toby A Inkster

KiwiBrian said:
What is the best way of individual defining/controlling the vertical
positioning of (say) 4 seperate text entries in a table cell?

margin-top
margin-bottom

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 37 days, 17:34.]
[Now Playing: Ray Charles - Funny but I Still Love You]

Bottled Water
http://tobyinkster.co.uk/blog/2008/02/18/bottled-water/
 
K

KiwiBrian

Toby A Inkster said:
margin-top
margin-bottom

Thanks Toby.
I had tried that without success and thought that the default vertical
centering was interfering in the process.
However from your advice I assume that I was wrong and will set up a special
test scenario.
Thanks.
 
Ad

Advertisements

B

Ben C

What is the best way of individual defining/controlling the vertical
positioning of (say) 4 seperate text entries in a table cell?
It must be cross-browser compatible.
My research indicated that if I applied a style of position: relative to the
first text entry, then I could apply position: absolute to the others.
Did not work for me.
Trying to make the table cell position: relative behaved differently between
IE7 and FF.

Yes, FF doesn't allow table cells to be containing blocks for positioned
descendents.
Assume that the table cell will not have its size changed by other cells in
the same table.

If the boxes are block boxes use margins as Toby suggested. Otherwise
set line-height on the <td> to its actual height (you're setting the
height anyway from the sound of things) and line-height: normal and
vertical-align: top/middle/bottom on each of the spans.
 

Top