i have these two pages of information which are stored on a php page which then feeds the main div tag on the index page.

the problem i have here is that a scrollbar shows up on the first page but not the second. so to see the rest of the information on the page the user needs to click iun the div and scroll with the mouse or the arrow keys.

i cannot work out for the life of me why this is happening (and i know it is prob starring right at me with two fingers up laughing)

here is the code for the page were the scrollbar is visible and works

case 2:
         echo '';
      $db = "pipdb";
      $con = mysql_connect("localhost","***","*******")or die(mysql_error());

      mysql_select_db($db)or die(mysql_error());
      $result = mysql_query("SELECT * FROM ***** ORDER BY id DESC") or die(mysql_error());
      echo "<div style=\"height: 500px; width: 450px; overflow:auto;\">";
      echo "<table width=350px border=0>\n";
      // keeps getting the next row until there are no more to get
      while($row = mysql_fetch_array( $result )) {
         // Print out the contents of each row into a table
         echo "<tr><td>";
         echo $row['date'];
         echo "</td></tr>";
         echo "<tr><td><b>";
         echo $row['title'];
         echo "</b></td></tr>";
         echo "<tr><td>";
         if(!empty($row['image'])) {
         echo '<img src="images/'.$row['image'].'">';
         }
         echo $row['article'];
         echo "</td></tr>";
         echo"<tr><td>&nbsp;</tr></td>";
      }

echo "</table>";
echo "</div>";
         break;

and the code where the scrollbar is not visible

case 8:
         echo "<div style=\"height: 500px; width: 300px; overflow:auto;\">";
      echo'<table width=100% border=0 align="center">
                  <tr>
            <td><h2><b>Cobalt Housing</b></h2>
               Cobalt Housing<br />
               Cobalt Housing<br />
               Cobalt Housing<br />
               Cobalt Housing<br />
               Cobalt Housing<br />
               Cobalt Housing<br />
               <br />
               <b>Tel :</b>Cobalt Housing<br />
               <b>Fax :</b>Cobalt Housing<br />
               <b>Email :</b> <a href="mailto:Cobalt Housing?subject=Enqiry from PiP website">Cobalt Housing</a>
            </td>
         </tr>
              <tr>
            <td>&nbsp;</td>
         </tr>
         <tr>
            <td><h2><b>LHT</b></h2>
               LHT<br />
               LHT<br />
               LHT<br />
               LHT<br />
               LHT<br />
               LHT<br />
               <br />
               <b>Tel :</b>LHT<br />
               <b>Fax :</b>LHT<br />
               <b>Email :</b> <a href="mailto:LHT?subject=Enqiry from PiP website">LHT</a>
            </td>
         </tr>
         <tr>
            <td>&nbsp;</td>
         </tr>
         <tr>
            <td><h2><b>LMH</b></h2>
               LMH<br />
               LMH<br />
               LMH<br />
               LMH<br />
               LMH<br />
               LMH<br />
               <br />
               <b>Tel :</b>LMH<br />
               <b>Fax :</b>LMH<br />
               <b>Email :</b> <a href="mailto:LMH?subject=Enqiry from PiP website">LMH</a>
            </td>
         </tr>
         <tr>
            <td>&nbsp;</td>
         </tr>
         <tr>
            <td><h2><b>Plus Dane Group</b></h2>
               Plus Dane Group<br />
               Plus Dane Group<br />
               Plus Dane Group<br />
               Plus Dane Group<br />
               Plus Dane Group<br />
               Plus Dane Group<br />
               <br />
               <b>Tel :</b>Plus Dane Group<br />
               <b>Fax :</b>Plus Dane Group<br />
               <b>Email :</b> <a href="mailto:Plus Dane Group?subject=Enqiry from PiP website">Plus Dane Group</a>
            </td>
         </tr>
         <tr>
            <td>&nbsp;</td>
         </tr>
         <tr>
            <td><h2><b>The Regenda Group</b></h2>
               The Regenda Group<br />
               The Regenda Group<br />
               The Regenda Group<br />
               The Regenda Group<br />
               The Regenda Group<br />
               The Regenda Group<br />
               <br />
               <b>Tel :</b>The Regenda Group<br />
               <b>Fax :</b>The Regenda Group<br />
               <b>Email :</b> <a href="mailto:The Regenda Group?subject=Enqiry from PiP website">The Regenda Group</a>
            </td>
         </tr>
         <tr>
            <td>&nbsp;</td>
         </tr>
         <tr>
            <td><h2><b>SLH Group</b></h2>
               SLH Group<br />
               SLH Group<br />
               SLH Group<br />
               SLH Group<br />
               SLH Group<br />
               SLH Group<br />
               <br />
               <b>Tel :</b>SLH Group<br />
               <b>Fax :</b>SLH Group<br />
               <b>Email :</b> <a href="mailto:SLH Group?subject=Enqiry from PiP website">SLH Group</a>
            </td>
         </tr>
         <tr>
            <td>&nbsp;</td>
         </tr>
         <tr>
            <td><h2><b>Venture</b></h2>
               Venture<br />
               Venture<br />
               Venture<br />
               Venture<br />
               Venture<br />
               Venture<br />
               <br />
               <b>Tel :</b>Venture<br />
               <b>Fax :</b>Venture<br />
               <b>Email :</b> <a href="mailto:Venture?subject=Enqiry from PiP website">Venture</a>
            </td>
         </tr>
         <tr>
            <td>&nbsp;</td>
         </tr>
         
            


      </table>
      </div>';
         break;

i know the things displayed are slightly different but this shouldnt matter should it?

(p.s ie is s**t (my feelings not daniwebs))

sorted. took the centre from the table in the second section of the code and it has decided to work now.

if someone could shed any light on why this happened please do so.

i removed the centre from the table and it worked fine but before that the scrollbar just wouldnt show. i was viewing it first in ie7 with the table centred and the scrollbar was not visible.

very strange i nearly pulled all my hair out yesterday trying to fix that problem. no worries i got a new problem now i will start a new post.

This question has already been answered. Start a new discussion instead.