UPDATE …..
I hope any one can solve this problem
when I use <td>
tag to show my data inside Modal popup the table is shown scatters …
while when use <h5>
tag every thing is OK
here is my modal code
<div id="myModal<?php echo $row['id'];
$x = $row['id'];
?>" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<?php
$records = mysqli_query($conn,"select * from trans where id = $x ");
while($row = mysqli_fetch_array($records))
{
?>
<!--
<td> <?php echo $row['id']; ?></td>
<td> <?php echo $row['date']; ?></td>
<td> <?php echo $row['invNO']; ?></td>
<td> <?php echo $row['income']; ?></td>
-->
<h6>ID : <?php echo $row['id']; ?></h6>
<h6>Date : <?php echo $row['date']; ?></h6>
<h6>inv No : <?php echo $row['invNO']; ?></h6>
<h6>income : <?php echo $row['income']; ?></h6>
<?php
}
?>
</div>
</div>
</div>
</div>
2
Answers
I found a solution for this issue
From MDN, it states that:
What you’re experiencing is likely a browser quirk, where it rearranges your HTML output, and puts your
<td>
elements in a place that you don’t expect.To solve this, you should either replace
<td>
elements with something else (like you have done with the heading tags), or remember to wrap the cells within a<table />
and<tr />
tag.