php - put two table in same line html -
how supposed put 2 table in same line ? codes below show table go new line. please me . want in html
this tables . want put them in 1 line
and codes
<table border="1"> <tr> <td><b>#</b></td> <td><b>request id</b></td> <td><b>title</b></td> <td><b>importance</b></td> <td><b>date</b></td> <td><b>status</b></td> <td><b>view/reply</b></td> </tr> <?php $a=1; $res = mysql_query("select * request req_status = 'undone' order req_status desc,req_important asc,req_datereceive desc"); while ($row = mysql_fetch_array($res)){ ?> <tr> <td><?php echo $a; ?></td> <td><?php echo $row['req_id']; ?></td> <td><?php echo $row['req_title']; ?></td> <td><?php echo $row['req_important']; ?></td> <td><?php echo $row['req_datereceive']; ?></td> <td><b><?php echo $row['req_status']; ?></b></td> <?php if( $row['req_status'] == "undone") { ?> <td><a href="viewrequestadmin.php?var1=reply&var=<?php echo $row['req_id']; ?>"><image src = "reply.jpg" height="65" width ="80"></a></td> <?php } else { ?> <td><a href="viewrequestadmin.php?var1=view&var=<?php echo $row['req_id']; ?>"><image src = "view2.jpg"></a></td> <?php } ?> </tr> <?php $a++; } ?> </table> <td> </td> <table border="1"> <tr> <td><b>#</b></td> <td><b>request id</b></td> <td><b>title</b></td> <td><b>importance</b></td> <td><b>date</b></td> <td><b>status</b></td> <td><b>view/reply</b></td> </tr> <?php $a=1; $res = mysql_query("select * request req_status = 'done' order req_status desc,req_important asc,req_datereceive desc"); while ($row = mysql_fetch_array($res)){ ?> <tr> <td><?php echo $a; ?></td> <td><?php echo $row['req_id']; ?></td> <td><?php echo $row['req_title']; ?></td> <td><?php echo $row['req_important']; ?></td> <td><?php echo $row['req_datereceive']; ?></td> <td><b><?php echo $row['req_status']; ?></b></td> <?php if( $row['req_status'] == "undone") { ?> <td><a href="viewrequestadmin.php?var1=reply&var=<?php echo $row['req_id']; ?>"><image src = "reply.jpg" height="65" width ="80"></a></td> <?php } else { ?> <td><a href="viewrequestadmin.php?var1=view&var=<?php echo $row['req_id']; ?>"><image src = "view2.jpg"></a></td> <?php } ?> </tr> <?php $a++; } ?> </table>
a non css solution. (as requested)
make 1 table, , place each table within cell naturally falls columns
<table> <tr> <td> <table> <!-- left table --> </table> </td> <td> <table> <!-- right table --> </table> </td> </tr> </table>
it better float divs columns instead though
css
.floatleft { width: 50%; float: left; }
html
<div class="floatleft"> <table></table> </div> <div class="floatleft"> <table></table> </div>
Comments
Post a Comment