Ich habe diese Auswahlliste innerhalb eines div und ich möchte die Höhe auf 100% und nicht die Größe Nummer (Größe = 10) der Auswahl. Wie kann ich es tun?Wählen Sie Listenhöhe 100 Prozent innerhalb div
Mein Code:
<div style="top:18%; left:5%; width:25%; height:40%; background: rgba(0,204,0,1); position:absolute; border:#0000FF solid 1px;">
<table width="100%" height="10%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="middle">Header</td>
</tr>
</table>
<div>
<form id="form2" name="form2" method="post" action="">
<select name="selectList" id="selectList" size="10" style="width:100%; height:50%; overflow-y:scroll;">
<?php
$qry= pg_query($dbconn,"select * from table") or die(pg_last_error($dbconn));
while($row_qry = pg_fetch_assoc($qry)){
?>
<option value="<?php echo $row_qry['id']; ?>"><?php echo $row_qry['name']; ?></option>
<?php } ?>
</select>
</form>
</div>
</div>
Sie wollen 'select' 100% Höhe des Bildschirms oder des übergeordneten Elements? –
90% weil die Tabelle bereits 10% ist –