Re: correct equivalent construct for 1 line of code
On 2007-04-16, pamela fluente <pamelafluente@ libero.itwrote:
[...]
It is possible in CSS using:
1. display: inline-block and setting line-height. Or
2. display: table-cell to do what you're doing anyway but without
<tableelement s.
(2) doesn't work in IE, (1) might, but doesn't work in FF.
So realistically, it's not possible other than the way you're doing it.
On 2007-04-16, pamela fluente <pamelafluente@ libero.itwrote:
[...]
Basically I have to make 3 kind of boxes:
>
1
><table style=" background-color: Aqua" >
<tr>
<td width="xx" height="yy" valign="top">
Multiline text
</td>
</tr>
></table>
>
2
>
><table style=" background-color: Aqua" >
<tr>
<td width="xx" height="yy" valign="middle" >
Multiline text
</td>
</tr>
></table>
>
3
>
><table style=" background-color: Aqua" >
<tr>
<td width="xx" height="yy" valign="bottom" >
Multiline text
</td>
</tr>
></table>
>
where xx, yy are any number.
>
This is perfectly fine (because it can match perfectley the user's
design).
>
HOWEVER. If there is a more correct way to have the *SAME* visual
result on MSIE and FF using correct CSS instead of those 3 clumsy
constructs, I will be happy.
>
All I need is the precise replacement for the above 3 king of boxes,
done with
correct CSS, to work with MSIE and FF. That's it. As simple as that.
>
Can you just do this simple tyny thing with CSS ? If not, don't be
afraid to tell me so.
>
1
><table style=" background-color: Aqua" >
<tr>
<td width="xx" height="yy" valign="top">
Multiline text
</td>
</tr>
></table>
>
2
>
><table style=" background-color: Aqua" >
<tr>
<td width="xx" height="yy" valign="middle" >
Multiline text
</td>
</tr>
></table>
>
3
>
><table style=" background-color: Aqua" >
<tr>
<td width="xx" height="yy" valign="bottom" >
Multiline text
</td>
</tr>
></table>
>
where xx, yy are any number.
>
This is perfectly fine (because it can match perfectley the user's
design).
>
HOWEVER. If there is a more correct way to have the *SAME* visual
result on MSIE and FF using correct CSS instead of those 3 clumsy
constructs, I will be happy.
>
All I need is the precise replacement for the above 3 king of boxes,
done with
correct CSS, to work with MSIE and FF. That's it. As simple as that.
>
Can you just do this simple tyny thing with CSS ? If not, don't be
afraid to tell me so.
1. display: inline-block and setting line-height. Or
2. display: table-cell to do what you're doing anyway but without
<tableelement s.
(2) doesn't work in IE, (1) might, but doesn't work in FF.
So realistically, it's not possible other than the way you're doing it.
Comment