Absolute position in td on Android 2.3.3

152 views Asked by At

My phone is on Android 2.3.3 and it uses the stock browser (HTC Desire aka. Bravo).

I have a table and it has many rows. One row has two cells.

I have set the position of second cell as relative, and in this cell, I have a div that's position is absolute. My purpose is to show a text on right top side of each cell. On my desktop computer on Firefox 37, everything is great, but on Android, it shows that text on right top of the whole page, and not each cell. So, it absolute positions the text according to page not each cell.

Is this a known issue? and is there any fix for this? (Note: Position value is absolute, not fixed.)

td.info:

position: relative;
padding: 8px 8px;
vertical-align: top;
border-bottom: solid 1px #f0f0f0;

.category:

display: inline-block;
position: absolute;
top: 10px;
right: 10px;
text-align: right;
font-size: 70%;
color: silver;
-webkit-backface-visibility: hidden;
1

There are 1 answers

0
tcak On

I solved this. Instead of setting position of td element, I created a div as the first element of td, and set its position: relative. Then put the category into that new div element. Now it works as expected.