本文主要是介绍为什么FF下文本无法撑开容器的高度,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
标准浏览器中固定高度值的容器是不会象IE6里那样被撑开的,那我又想固定高度,又想能被撑开需要怎样设置呢?办法就是去掉he ight设置min-height:200px; 这里为了照顾不认识min-height的IE6 可以这样定义:<!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>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<style type="text/css">
<!--
div { [color=red]height:auto !important; height:100px; min-height:100px; [/color]border:1px solid red;overflow:visible;}
-->
</style>
</head>
<body>
<div>
I LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
I LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
JOHNI LOVE MY COUNTRY! <br>
</div>
</body>
</html>
这篇关于为什么FF下文本无法撑开容器的高度的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!