943,865 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 1132
  • PHP RSS
Apr 1st, 2009
0

scrollbar not showing

Expand Post »
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

PHP Syntax (Toggle Plain Text)
  1. case 2:
  2. echo '';
  3. $db = "pipdb";
  4. $con = mysql_connect("localhost","***","*******")or die(mysql_error());
  5.  
  6. mysql_select_db($db)or die(mysql_error());
  7. $result = mysql_query("SELECT * FROM ***** ORDER BY id DESC") or die(mysql_error());
  8. echo "<div style=\"height: 500px; width: 450px; overflow:auto;\">";
  9. echo "<table width=350px border=0>\n";
  10. // keeps getting the next row until there are no more to get
  11. while($row = mysql_fetch_array( $result )) {
  12. // Print out the contents of each row into a table
  13. echo "<tr><td>";
  14. echo $row['date'];
  15. echo "</td></tr>";
  16. echo "<tr><td><b>";
  17. echo $row['title'];
  18. echo "</b></td></tr>";
  19. echo "<tr><td>";
  20. if(!empty($row['image'])) {
  21. echo '<img src="images/'.$row['image'].'">';
  22. }
  23. echo $row['article'];
  24. echo "</td></tr>";
  25. echo"<tr><td>&nbsp;</tr></td>";
  26. }
  27.  
  28. echo "</table>";
  29. echo "</div>";
  30. break;

and the code where the scrollbar is not visible

PHP Syntax (Toggle Plain Text)
  1. case 8:
  2. echo "<div style=\"height: 500px; width: 300px; overflow:auto;\">";
  3. echo'<table width=100% border=0 align="center">
  4. <tr>
  5. <td><h2><b>Cobalt Housing</b></h2>
  6. Cobalt Housing<br />
  7. Cobalt Housing<br />
  8. Cobalt Housing<br />
  9. Cobalt Housing<br />
  10. Cobalt Housing<br />
  11. Cobalt Housing<br />
  12. <br />
  13. <b>Tel :</b>Cobalt Housing<br />
  14. <b>Fax :</b>Cobalt Housing<br />
  15. <b>Email :</b> <a href="mailto:Cobalt Housing?subject=Enqiry from PiP website">Cobalt Housing</a>
  16. </td>
  17. </tr>
  18. <tr>
  19. <td>&nbsp;</td>
  20. </tr>
  21. <tr>
  22. <td><h2><b>LHT</b></h2>
  23. LHT<br />
  24. LHT<br />
  25. LHT<br />
  26. LHT<br />
  27. LHT<br />
  28. LHT<br />
  29. <br />
  30. <b>Tel :</b>LHT<br />
  31. <b>Fax :</b>LHT<br />
  32. <b>Email :</b> <a href="mailto:LHT?subject=Enqiry from PiP website">LHT</a>
  33. </td>
  34. </tr>
  35. <tr>
  36. <td>&nbsp;</td>
  37. </tr>
  38. <tr>
  39. <td><h2><b>LMH</b></h2>
  40. LMH<br />
  41. LMH<br />
  42. LMH<br />
  43. LMH<br />
  44. LMH<br />
  45. LMH<br />
  46. <br />
  47. <b>Tel :</b>LMH<br />
  48. <b>Fax :</b>LMH<br />
  49. <b>Email :</b> <a href="mailto:LMH?subject=Enqiry from PiP website">LMH</a>
  50. </td>
  51. </tr>
  52. <tr>
  53. <td>&nbsp;</td>
  54. </tr>
  55. <tr>
  56. <td><h2><b>Plus Dane Group</b></h2>
  57. Plus Dane Group<br />
  58. Plus Dane Group<br />
  59. Plus Dane Group<br />
  60. Plus Dane Group<br />
  61. Plus Dane Group<br />
  62. Plus Dane Group<br />
  63. <br />
  64. <b>Tel :</b>Plus Dane Group<br />
  65. <b>Fax :</b>Plus Dane Group<br />
  66. <b>Email :</b> <a href="mailto:Plus Dane Group?subject=Enqiry from PiP website">Plus Dane Group</a>
  67. </td>
  68. </tr>
  69. <tr>
  70. <td>&nbsp;</td>
  71. </tr>
  72. <tr>
  73. <td><h2><b>The Regenda Group</b></h2>
  74. The Regenda Group<br />
  75. The Regenda Group<br />
  76. The Regenda Group<br />
  77. The Regenda Group<br />
  78. The Regenda Group<br />
  79. The Regenda Group<br />
  80. <br />
  81. <b>Tel :</b>The Regenda Group<br />
  82. <b>Fax :</b>The Regenda Group<br />
  83. <b>Email :</b> <a href="mailto:The Regenda Group?subject=Enqiry from PiP website">The Regenda Group</a>
  84. </td>
  85. </tr>
  86. <tr>
  87. <td>&nbsp;</td>
  88. </tr>
  89. <tr>
  90. <td><h2><b>SLH Group</b></h2>
  91. SLH Group<br />
  92. SLH Group<br />
  93. SLH Group<br />
  94. SLH Group<br />
  95. SLH Group<br />
  96. SLH Group<br />
  97. <br />
  98. <b>Tel :</b>SLH Group<br />
  99. <b>Fax :</b>SLH Group<br />
  100. <b>Email :</b> <a href="mailto:SLH Group?subject=Enqiry from PiP website">SLH Group</a>
  101. </td>
  102. </tr>
  103. <tr>
  104. <td>&nbsp;</td>
  105. </tr>
  106. <tr>
  107. <td><h2><b>Venture</b></h2>
  108. Venture<br />
  109. Venture<br />
  110. Venture<br />
  111. Venture<br />
  112. Venture<br />
  113. Venture<br />
  114. <br />
  115. <b>Tel :</b>Venture<br />
  116. <b>Fax :</b>Venture<br />
  117. <b>Email :</b> <a href="mailto:Venture?subject=Enqiry from PiP website">Venture</a>
  118. </td>
  119. </tr>
  120. <tr>
  121. <td>&nbsp;</td>
  122. </tr>
  123.  
  124.  
  125.  
  126.  
  127. </table>
  128. </div>';
  129. 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))
Similar Threads
Reputation Points: 27
Solved Threads: 1
Posting Whiz
kevin wood is offline Offline
347 posts
since Feb 2008
Apr 1st, 2009
0

Re: scrollbar not showing

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.
Reputation Points: 27
Solved Threads: 1
Posting Whiz
kevin wood is offline Offline
347 posts
since Feb 2008
Apr 1st, 2009
0

Re: scrollbar not showing

I can see scroll bar on both the cases. In both IE and FF3.
Moderator
Featured Poster
Reputation Points: 524
Solved Threads: 356
Purple hazed!
nav33n is offline Offline
3,878 posts
since Nov 2007
Apr 1st, 2009
0

Re: scrollbar not showing

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.
Reputation Points: 27
Solved Threads: 1
Posting Whiz
kevin wood is offline Offline
347 posts
since Feb 2008
Apr 1st, 2009
1

Re: scrollbar not showing

Thats strange. Because that same script showed scroll bar for me.
Moderator
Featured Poster
Reputation Points: 524
Solved Threads: 356
Purple hazed!
nav33n is offline Offline
3,878 posts
since Nov 2007
Apr 1st, 2009
0

Re: scrollbar not showing

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.
Reputation Points: 27
Solved Threads: 1
Posting Whiz
kevin wood is offline Offline
347 posts
since Feb 2008
Apr 1st, 2009
0

Re: scrollbar not showing

Cheers man!
Moderator
Featured Poster
Reputation Points: 524
Solved Threads: 356
Purple hazed!
nav33n is offline Offline
3,878 posts
since Nov 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Regardind display of days
Next Thread in PHP Forum Timeline: The specified CGI application misbehaved by not returning a complete set of HTTP head





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC