I got row with cells that have position:relative'
, inside them I got select
elements with position:absolute
. The problem is when I add for example top:0
the select is going to top of page and not to top of table cell -Why??
<div class='content'>
...
<tr class="search">
<td>...</td><td>...</td><td>
<select name="source" id="id_source" class="ui-corner-all" multiple="multiple">
<option value="1">Test1</option>
</select>
</td>
<td>
<select name="owner" id="id_owner" class="ui-corner-all" multiple="multiple">
<option value="1">admin</option>
<option value="2">Janusz</option>
</select></td></tr>
...
</div>
and css
.search td {
position:relative;
vertical-align: top;
width: auto;
height: auto;
}
.content select[multiple=multiple]{
height:1.5em;
background-color:#D4CCB0;
position: absolute;
padding:4px;
top:0px
}