kev wood Posted March 31, 2009 Share Posted March 31, 2009 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> </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> </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> </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> </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> </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> </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> </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> </td> </tr> </table> </div>'; break; i know the things displayed are slightly different but this shouldnt matter should it? Quote Link to comment Share on other sites More sharing options...
Brian W Posted March 31, 2009 Share Posted March 31, 2009 I don't see the problem, but this topic should be in the CSS board... Quote Link to comment Share on other sites More sharing options...
kev wood Posted March 31, 2009 Author Share Posted March 31, 2009 thought it might have been a problem with it bein html being sent from a php page Quote Link to comment Share on other sites More sharing options...
kev wood Posted April 1, 2009 Author Share Posted April 1, 2009 removed the centre from the table and the scrollbar has now appeared???????????? anybody know why this happens? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.