2014-05-04 180 views
1

編輯:在這裏回答:Google Chrome Bug - Overflow:auto | scroll doesn't workCSS:溢出:滾動;不出現

我的溢出滾動條沒有出現在我的結果page.php。我已經檢查過錯誤,例如沒有包括班級在內的高度,但我無處可去。也許這是搞亂它的PHP?

enter image description here

您可以通過這裏http://biketurtle.co/search.php 和搜索在「安特里姆」自行車下千歐元

這裏看到自己的問題是CSS類:

.textarea 

{ 
height: 848px; 
padding-right: 20px; 
padding-left: 20px; 
list-style: none; 
overflow:scroll; 
position:relative; 

} 

這裏是一些HTML:

<section class="section"> 

<div class="textarea"> 
<h1>Search</h1> 

<?php 
if($_SERVER['REQUEST_METHOD']=='POST') 
{ 
include("db_connect.php"); 

$sql = "SELECT brand,model,type,town,location,university,price,cond,description FROM  placead WHERE price < ? AND location = ?"; 
if($stmt = $link->prepare($sql)) 
{ 
$stmt->bind_param('is', $_POST['price'], $_POST['location']); 
$stmt->execute(); 
$stmt- >bind_result($brand,$model,$type,$town,$location,$university,$price,$condition,$description ); 


/* store result */ 
$stmt->store_result(); //required to get num_rows 
echo"=============================================================="; 
echo "<br/>"; 
echo "<br/>"; 
printf("Your search returned : %d records <br/>", $stmt->num_rows); 
echo "<br/>"; 
echo"=============================================================="; 

/* fetch values */ 
while ($stmt->fetch()) { 
echo "<br />Price.................................".$price." Euro."; 
echo "<br />location..............................".$location; 
echo "<br />Brand.................................".$brand; 
echo "<br />Model.................................".$model; 
echo "<br />Type..................................".$type; 
echo "<br />Town..................................".$town; 
echo "<br />University............................".$university; 
echo "<br />Condition.............................".$condition; 
echo "<br/>"; 
echo "<br/>"; 
echo "<br />    Description   "; 
echo "<br/>"; 
echo "<br/>".$description; 
echo "<br/>"; 
echo"=============================================================="; 
} 
//close the crecordset 
$stmt->close(); 
} 
$link->close(); 
} 
else { 
?> 
// contd...... 
+1

顯示呈現的html,而不是php代碼。 –

+0

呈現的html在'view source'中非常混亂。該頁面在這裏:http://biketurtle.co/search.php只需搜索location ='Antrim',價格<1000 – COOLBEANS

+1

回答

0

我沒有看到任何錯誤。我創建了一個帶有相同CSS屬性的文本框的jsfiddle:http://jsfiddle.net/TD6HX/

#limit_height 
{ 
    width: 200px; 
    height:300px; 
    overflow: scroll; 
    position:relative; 
    padding-left:15px; 
    padding-right:15px; 
}