Table not showing up correctly

  • demonmaestro
  • Gold Member
  • Gold Member
  • User avatar
  • Posts: 679
  • Loc: Conroe, Texas

Post 3+ Months Ago

table showing up fonky in IE 6/8 or IE11 in compatibility mode. However it shows up fine in chrome/Firefox and in regular mode of IE11

This is how it looks in IE6/8 and IE11 in compatibility mode.
Image

This is how it should look. This is in Chrome.
Image

Code: [ Select ]
<table border="1" cellspacing="0" cellpadding="0" width="100%">
   <tr>
    <td width="12%">Week <?php echo $current_week; ?></td>
    <?php foreach($days_of_week as $day): ?>
    <td><?php echo $day; ?></td>
    <?php endforeach; ?>
    <td width="14%">Total</td>
   </tr>
   <?php foreach($done_bits as $machine => $info): ?>
   <tr>
    <td><?php echo $machine; ?></td>
    <?php foreach($days_of_week as $day): ?>
    <td><?php
                    if(isset($info[$day])) {

                        $count = 1;
                        foreach($info[$day] as $key => $order) {

                            
                            if($order['shift'] == 2) {
                                echo '<div style="color:#00ff5c">';
                            }

                            echo $order['serial'];

                            if($order['shift'] == 2) {     
                                echo '</div>';
                            }
    
                            if(count($order) > $count) {
                                echo '<br />';
                            }

                            $count++;
                        }
                    }

                ?></td>
    <?php endforeach; ?>
    <td><?php echo $info['total']; ?></td>
   </tr>
   <?php endforeach; ?>
   <tr>
    <td colspan="8" align="right">Weekly Total</td>
    <td><?php echo $weekly_total; ?></td>
   </tr>
  </table>
  1. <table border="1" cellspacing="0" cellpadding="0" width="100%">
  2.    <tr>
  3.     <td width="12%">Week <?php echo $current_week; ?></td>
  4.     <?php foreach($days_of_week as $day): ?>
  5.     <td><?php echo $day; ?></td>
  6.     <?php endforeach; ?>
  7.     <td width="14%">Total</td>
  8.    </tr>
  9.    <?php foreach($done_bits as $machine => $info): ?>
  10.    <tr>
  11.     <td><?php echo $machine; ?></td>
  12.     <?php foreach($days_of_week as $day): ?>
  13.     <td><?php
  14.                     if(isset($info[$day])) {
  15.                         $count = 1;
  16.                         foreach($info[$day] as $key => $order) {
  17.                             
  18.                             if($order['shift'] == 2) {
  19.                                 echo '<div style="color:#00ff5c">';
  20.                             }
  21.                             echo $order['serial'];
  22.                             if($order['shift'] == 2) {     
  23.                                 echo '</div>';
  24.                             }
  25.     
  26.                             if(count($order) > $count) {
  27.                                 echo '<br />';
  28.                             }
  29.                             $count++;
  30.                         }
  31.                     }
  32.                 ?></td>
  33.     <?php endforeach; ?>
  34.     <td><?php echo $info['total']; ?></td>
  35.    </tr>
  36.    <?php endforeach; ?>
  37.    <tr>
  38.     <td colspan="8" align="right">Weekly Total</td>
  39.     <td><?php echo $weekly_total; ?></td>
  40.    </tr>
  41.   </table>
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

I believe all that is missing is putting a &nbsp; in your empty table cells. Some browsers, especially older browsers may require that in order to show borders around the cell.
  • demonmaestro
  • Gold Member
  • Gold Member
  • User avatar
  • Posts: 679
  • Loc: Conroe, Texas

Post 3+ Months Ago

Yes sir that was it.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: Bogey, Liamw411 and 43 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.