I have the following code and was expecting TABLE will shrink with browser window. But it doesn’t. Why?
<body>
<table style="position:fixed; left:50px; right:50px; bottom:50px; border:solid">
<tr>
<td style="border:solid">Left cell</td>
<td style="border:solid">Right cell</td>
</tr>
</table>
</body>
UPDATE
I was even going to be disappointed with CSS language at all, but apparently people who were saying it is impossible to apply both RIGHT and LEFT styles were WRONG!
So it IS possible, for DIVs for example.
Also I found that the following code works better:
<table>
<tr style="position:fixed; left:50px; right:50px; bottom:50px; border:solid">
<td style="border:solid; width:inherit">Left cell</td>
<td style="border:solid; width:inherit">Right cell</td>
</tr>
</table>
You definitely can apply both
rightandleftproperties to an element. The problem (I think) is that tables are a special case – they will only stretch to fit the width of the content in them if a width is not explicitly specified.You need to do something like this, using a positioned wrapper
divand setting both thewidthandheightof thetableto fill that.