我的问题是是否有人可以帮助我将“container-div”定位在“settings-div”下。即使有人放大,我也希望它保持在“settings-div”下。
HTML:
<body>
<div class="menu">
<div class="option">Home</div>
<div class="option">Media</div>
<div class="option">link 3</div>
<div class="option">link 4</div>
<div class="option">link 5</div>
<div class="open"></div>
<div class="option" id="settings">Settings</div>
</div>
<div id="container">
<div class="s-o">Account</div>
<div class="s-o">Privacy</div>
<div class="s-o">Logout</div>
</div>
</body>
CSS:
html {
background-image: url("carbon_background.jpg");
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cgoogleover;
}
body, html {
height: 100%;
width: 100%;
padding: 0;
}
.menu {
margin-top: 0px;
height: 25px;
background-color: #3B5998;
margin-left: 0px;
margin-right: 0px;
border-radius: 0px;
margin-top: 0px;
width: 100%;
display: block;
top: 0px;
left: 0px;
margin-top: -8px;
margin-left: -8px;
}
.menu .option {
float: left;
width: 15%;
text-align: center;
background-color: #3B5998;
height: 25px;
border-radius: 0px;
color: white;
font-size: 20px;
text-decoration: none;
list-style-type: none;
}
.menu .open {
float: left;
width: 10%;
text-align: center;
background-color: #3B5998;
height: 25px;
border-radius: 0px;
text-decoration: none;
list-style-type: none;
}
.s-o {
list-style-type: none;
color: white;
margin-left: 85%;
background-color: #BBBBFF;
opacity: 0;
width: 15%;
margin-top: 0px;
text-align: center;
font-size: 20px;
}