I have a div
that has a table in it.the table has a row and tow columns.I want a div
inside the second column and I want it to be positioned absolute from the table column(not the start of the page).so here is what I did:
this is the html file:
<body>
<div id="one">
<table id="table">
<tr id="two">
<td id="three"></td>
<td id="three">
<div id="four"></div>
</td>
</tr>
</table>
</div>
</body>
and this is the CSS:
#one {
width: 100%;
height: 100px;
background-color: #f00;
}
#three {
width: 100px;
height: 80px;
background-color: #b6ff00;
/*margin-left: 100px;*/
/*float: left;*/
position: relative;
}
#four {
width: 50px;
height: 40px;
background-color: #0ff;
position: absolute;
left: 20px;
top: 20px;
}
this code works nicely on Chrome and IE.But it doesn't work on Firefox.In Firefox,the <div id=four>
's position,starts from the top left corner of the page rather than the <div id=three>
.What can I do about it?(And I should mention that I should use a table for my design.I can't use anything else here)