scrollbar not showing

Thread Solved

Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

scrollbar not showing

 
0
  #1
Apr 1st, 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

  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

  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))
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: scrollbar not showing

 
0
  #2
Apr 1st, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,761
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: scrollbar not showing

 
0
  #3
Apr 1st, 2009
I can see scroll bar on both the cases. In both IE and FF3.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: scrollbar not showing

 
0
  #4
Apr 1st, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,761
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: scrollbar not showing

 
1
  #5
Apr 1st, 2009
Thats strange. Because that same script showed scroll bar for me.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: scrollbar not showing

 
0
  #6
Apr 1st, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,761
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: scrollbar not showing

 
0
  #7
Apr 1st, 2009
Cheers man!
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 540 | Replies: 6
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC