Maybe it is really simple but I can't get it.
也许这很简单,但我无法得到它。
I'd like the center of my 3 columns to have 1280 width and have the other two resized in function of the size of the windows (so if, for instance, the window is 1280px large, I can't see the side divs).
我希望我的3列的中心有1280宽度,并且其他两个在窗口大小的功能中调整大小(例如,如果窗口是1280px大,我看不到侧面div) 。
Here is my code. Where am I wrong?
这是我的代码。我哪里错了?
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Documento senza titolo</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
<style>
div{display:block;}
#left{
border:1px solid green;
float:left;
width:auto;
}
#center{
border:1px solid red;
width:1280px;
float:left;
}
#right{
border:1px solid purple;
float:left;
width:auto;
}
</style>
</head>
<body>
<div id="container_center">
<div id="left"> </div>
<div id="center">
Lorem ipsum
</div>
<div id="right"> </div>
</div>
</body>
</html>
1 个解决方案
#1
0
It would help if you gave us the url of this so we do not have to load it on our own, but I would start by adding a min-width:10px;
and a min-height:100px
. Possible starting with some lorem ipsum because some browsers might ignore your space.
如果你给我们这个url,这将有所帮助,所以我们不必自己加载它,但我会先添加一个min-width:10px;和最小高度:100px。可能从某些lorem ipsum开始,因为某些浏览器可能会忽略您的空间。
#1
0
It would help if you gave us the url of this so we do not have to load it on our own, but I would start by adding a min-width:10px;
and a min-height:100px
. Possible starting with some lorem ipsum because some browsers might ignore your space.
如果你给我们这个url,这将有所帮助,所以我们不必自己加载它,但我会先添加一个min-width:10px;和最小高度:100px。可能从某些lorem ipsum开始,因为某些浏览器可能会忽略您的空间。