I have table, where second column is 120px wide. And I want to first column have width 100% of what left (100%-120px), but on android I can't use CALC
function. Source: http://caniuse.com/calc
<table>
<tr>
<td class="one">data</td>
<td class="two">data</td>
<tr>
<table>
.one { width: calc(100%-120px); }
.two { width: 120px; }
How to replace calc(100%-120px)
so it will work on Android?
Note: ( I don't know width 100% )
Simply don't set a width on .one
, or set it to auto
, then set the parent table to 100%
. This will cause the td with .one
to fill the remaining space of the table.
FIDDLE
<table>
<tr>
<td class="one">data</td>
<td class="two">data</td>
<tr>
<table>
CSS
table {
width: 100%;
}
.one {
background-color: red;
}
.two {
background-color: orange;
width: 120px;
}
Try this:
CSS
.one { width: 100%; }
.two { min-width: 120px; }
Here's a jsFiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With