Jump to content

help with scrollbar


kev wood

Recommended Posts

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.