gpt4 book ai didi

css - div宽度问题

转载 作者:行者123 更新时间:2023-11-28 19:04:44 25 4
gpt4 key购买 nike

我的问题是宽度/高度的比率(对于 id="wrapper"的 div,不同是巨大的)在 Chrome、Mozilla 和 IE 上是不一样的(IE 看起来就像 heigt 的拒绝属性)。任何帮助,我需要两个 div 固定大小,一个在另一个旁边。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>

<style type="text/css">

div#wrapper {
width: 1000px;
width:700px;
margin-left:auto;
margin-right:auto;
overflow: hidden;
}
div#left {
width: 80%;
height: 80%;
min-height: 80%;
float: left;
background-color: #DFDFDF;
border-left-width:2px;
border-left-style:solid;
border-left-color:#606060;
border-bottom-width:2px;
border-bottom-style:solid;
border-bottom-color:#606060;
border-top-width:2px;
border-top-style:solid;
border-top-color:#606060;
}
div#right_up {
width: 19%;
height: 80%;
min-height: 80%;
float: left;
background-color: whitesmoke;
border-top-width:2px;
border-top-style:dashed;
border-top-color:#FF2A2A;
border-right-width:2px;
border-right-style:dashed;
border-right-color:#FF2A2A;
border-left-width:2px;
border-left-style:solid;
border-left-color:whitesmoke;
}


</style>
</head>
<body id="body"">
<div id="wrapper">
<div id="left">
REFERENCE:

</div>
<div id="right_up">

</div>

</div>
</body>
</html>

最佳答案

首先,您不能在 float 元素上使用百分比高度。

其次,我没有看到包装器 div 上设置的高度

关于css - div宽度问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4010730/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com