Jump to content

problem in overflow: auto in table


newphpcoder
 Share

Recommended Posts

hi..i have table and I put style overflow:autoNow, I notice that also the <th> was up when I up the scroll.I just to happen is the <th> will be fix/ not move. only the <tr>here is my code:

<div id="kanban_table" style="overflow:auto; height:215px;"><table><th> JO No.</th><th> ETD </th><th> PO No. </th><th> SKU Code </th><th> Description </th><th> PO Req </th><th> Priority</th><?php$sql = "SELECT FromMonth , ToMonth FROM so_month";$res = mysql_query($sql, $con);$row = mysql_fetch_assoc($res);$FromMonth = $row['FromMonth'];$ToMonth = $row['ToMonth'];$sql = "SELECT ETD, PO_No, SKUCode, Description, POReqFROM sales_order  WHERE NOT EXISTS (SELECT PO_No FROM job_order WHERE job_order.PO_No = sales_order.PO_No) AND MONTH(ETD) BETWEEN '$FromMonth' AND '$ToMonth' ORDER BY ETD, PO_No ASC LIMIT 10 ";$res_so = mysql_query($sql, $con);while($row = mysql_fetch_assoc($res_so)){echo "<form name='joborder_form' action='' method='post'>";  $PO_No = $row['PO_No'];   echo "<tr><td><input type='text' value='' style='border:none;' size='10'></td><td><input type='text' name='ETD' id='ETD' value='$row[ETD]' style='border:none;' size='10'></td><td><input type='text' name='PO_No' id='PO_No' value='$row[PO_No]' style='border:none;' size='30'></td><td><input type='text' name='SKUCode' id='SKUCode' value='$row[sKUCode]' style='border:none;' size='15'></td><td><input type='text' name='Description' id='Description' value='$row[Description]' style='border:none;' size='35'></td><td><input type='text' name='POReq' id='POReq' value='$row[POReq]' style='border:none;' size='10'></td><td><input type='submit' name='priority' value='Approved' id='priority'></td></tr>";echo "</form>";}echo "</table>";echo "</div>";

Thank you

Link to comment
Share on other sites

So you want the overflow:auto style to only apply to the <tr> ? I would suggest putting a style-sheet in your header, and assigning the <tr> style as follows:

tr {overflow:auto;}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...