我的 div
与其他 div
在一起时遇到问题。
无论我给它什么位置,div
要么跳到页面顶部,要么不显示。
CSS:
.content {
width:100%;
background: #F0F0F0;
border: 1px solid #CCC;
height: 1000px;
margin: 0px auto;
}
.contentinside {
postition: relative;
margin: auto;
width: 960px;
height: 200px;
background-color:#000099;
}
HTML:
<div class="content">
<div class="contentinside">something here</div>
最佳答案
需要关闭您的第一个 div
标签。
<div class="content"></div>
<div class="contentinside">something here</div>
关于html - 我的 DIV 不听我的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19732258/