【问题标题】:CSS: Overflow:scroll; not appearingCSS:溢出:滚动;没有出现
【发布时间】:2014-05-05 09:00:56
【问题描述】:

编辑:在这里回答:Google Chrome Bug - Overflow:auto | scroll doesn't work

我的溢出滚动条没有出现在我的结果 page.php 中。我已经检查了错误,例如不包括高度以及班级,但我一无所获。也许是 php 搞砸了?

您可以前往http://biketurtle.co/search.php 自己查看问题 并在 'Antrim' 寻找价格低于 1000 欧元的自行车

这是 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......

【问题讨论】:

  • 显示呈现的 html,而不是 php 代码。
  • “查看源代码”中呈现的 html 非常混乱。页面在这里:biketurtle.co/search.php 只需搜索 location = 'Antrim' 和 price
  • "
  • 感谢 po4teda!原来的问题仍然存在。
  • 完整代码在这里:jsfiddle.net/53qs5Handy site。

标签: css scroll overflow


【解决方案1】:

我没有看到任何错误。我在这里创建了一个带有相同 CSS 属性的文本框的 jsfiddle:http://jsfiddle.net/TD6HX/

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-01-21
    • 2013-02-25
    • 2011-07-09
    • 1970-01-01
    • 2011-12-08
    • 1970-01-01
    • 2015-07-03
    相关资源
    最近更新 更多