div height problem
div height problem
a div has a style of "height:65%;overflow:scroll" ,but it doesn't
work in firefox.(it's ok in ie)
who can help me?
the source code as following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
<!--
.gabby{
font-size: 10px;
font-family: Verdana,Arial,Helvetica,sans-serif;
}
a:link,a:active,a:visited {
text-decoration: none;
}
.gabby_top {
margin: 1px;
height: 20px;
width: 100%;
}
.gabby_content {
white-space:normal;
word-break:break-all;
overflow: scroll;
overflow-x:hidden;
height: 65%;
width: 100%;
background-color: #FFFFFF;
margin-bottom: 5px;
}
.gabby_bottom {
height: 20%;
bottom: 2px;
}
.gabby_status {
color: #CCCCCC;
}
.gabby_user{
border: 1px solid #b3b3b3;
height: 20px;
margin: 2px;
}
.gabby_input{
overflow:auto;
width: 80%;
height: 30px;
}
-->
</style>
<link rel="stylesheet" href="../themes/flora/flora.all.css" type="text/
css" media="screen" title="flora (Default)">
<script language="javascript" src="../jquery.js"></script>
<script type="text/javascript" src="../jquery.dimensions.js"></script>
<script type="text/javascript" src="../ui.mouse.js"></script>
<script type="text/javascript" src="../ui.draggable.js"></script>
<script type="text/javascript" src="../ui.accordion.js"></script>
<script type="text/javascript" src="../ui.resizable.js"></script>
<script type="text/javascript" src="../ui.dialog.js"></script>
<script type="text/javascript">
var url = '{{url}}';
var comments_num = 0;
var user_color={};
var
color=["#FF0000","#00FF00","#0000FF","#000000","#00FFFF","#FF00FF"];
var comment="";
$(document).ready(function(){
$.ajaxSetup({
async: false,
cache:false
});
setInterval("get_comments()", 3000);
$("#gabby").dialog(
{height:350,
width:350,
minWidth:350,
minHeight:350,
position:'rightbottom',
resize:true,
title:"Chat"
}
);
});
function get_comments() {
$(".gabby_content").prepend("<span style=\"color:"+"#FF0000"+ "\">"
+"<a href='/user/"+"1"+"/' target='_blank'>"+"guest"+"</
a>: "+"hello world"+"</span>
");
a={'url':url,'comments_num':comments_num};
}
function rand_color(){
return color[Math.floor(Math.random()*6)];
}
function post_comment(){
if(comment == $("#content").val()){
$(".gabby_status").text("NO repeat!");
return;
}
comment = $("#content").val()
a={'url':url,'object':0,'ajax':1};
a['creator']=$("#creator").val();
a['content']=$("#content").val();
$.ajax({
type:"POST",
url:'/topic/add_comment/',
data:a,
success:function(data) {
$(".gabby_status").text("sucessful!");
},
error:function(data){
$(".gabby_status").text("failed!");
}
}
);
}
</script>
<title>Gabbly </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></
head>
<body>
<!--<div >
<iframe src="{{url}}" width="100%" height="100%" frameborder="0"
hspace="0" vspace="0" marginheight="0" marginwidth="0"></iframe>
</div> -->
<div id='gabby' class="flora">
<div class='gabby_top'>
<div style="float: left;">
<img src="/site_media/image/watched_n.gif" />
<!--{% if user.is_anonymous or not user %}
<input id="creator" type="text" value="Guest" size="8"
class="gabby_user">
{% else %}
<input id="creator" type="text" value="{{ user.username }}"
size="8" class="gabby_user">
{% endif %} -->
<span class='gabby_online'></span>
</div>
<div style="float:right"><a href="/user/login">登录</a>|<a href="/user/
register">注册</a></div>
<div style="clear:both"></div>
</div>
<div class='gabby_content'>
</div>
<div class='gabby_bottom'>
<span class='gabby_status'></span>
<textarea id="content" class="gabby_input"></textarea><br />
<input type="submit" value="发送" onClick="post_comment()">
</div>
</div>
</body>
</html>