我正在使用下面的代码并遇到一个问题,如果我调整浏览器的大小,我的主页 div 会包裹在菜单栏 div 下方,我尝试了最小和最大宽度,但没有任何效果。任何帮助将不胜感激。我希望主页 div 不会掉到菜单栏下方并与它并排,即使浏览器变小也是如此。
HTML:
<div id="menubar" style="width: 16%; height: 100px;" title="menu" align = "center"> <!-- This is the code for the menubar, to add a new option to the menubar-->
<!-- Add a new <li> tag below the bottom link, to delete a link, delete the desired
link element. -->
<ul>
<li style="align: center;"><img alt="logo" height="63" src="images/ClevelandLogo.gif" width="126" /></li>
<li ><a href="index.html" style="height: 20px;" class="auto-style5">Home</a></li>
<li><a href="rthyth.html">General</a></li>
<li><a href="rhtrhrthrth">Site map</a></li>
<li><a href="thrrthrthtr">Rules & Procdures</a></li>
<li><a href="rth" style="height: 20px">Envirommental</a></li>
<li><a href="rth">Energy</a></li>
<li><a href="rhtrhrth">IT</a></li>
<li><a href="rthtrhrt">SAP</a></li>
<li><a href="rthtrhtrhtrhtrh.html" style="height: 20px; width: 180px;">rhtrhtrh</a></li>
<li><a href="quality.html">Quality</a></li>
<li><a href="safety.html">Safety</a></li>
<li><a href="hr.html">Human resources</a></li>
<li><a href="prod.html">Production</a></li>
<li><a href="eng.html">Engineering</a></li>
<li><a href="feedback.html">Feedback</a></li>
<li><a href="tees.html">wrefwefwefwef</a></li>
<li><a href="cmp.html">Company mobile phones</a></li>
<li><a href="cms.html">Climate Survery Updates</a></li>
<li><a href="training.html">Training</a></li>
<li><a href="sports.html">Sports Dome</a></li>
</ul>
</div>
<!--The mainpage div is where all the page's indivdual content is displayed.-->
<div id="mainpage" class="auto-style1" style="height: 486px; float:left; color: #000000; font-size: 11pt;">
<p> -0je45iwgtjj4eg0prjegtgfjotrsjgse'[agpraeogjk-odetkgbokporgkspfkdgkpfdgkpdfkg</p>
</div>
<!-- The container1 div is used to create the bottom green line in the site -->
CSS:
#mainpage
{
border: thin solid #008852;
width: 84%;
float: left;
background-color: #EDEFEE;
height: auto;
border-radius: 20px;
height: 100%;
position: fixed;
color: #008852;
}
#mainpage a:link, #mainpage a:visited
{
font-family: Arial, Helvetica, sans-serif;
font-size: small;
font-weight: bold;
}
#menubar ul
{
list-style-type: none;
margin: 0;
padding: 0;
float: left;
}
#menubar a:link, #menubar a:visited
{
border-top-width: 1px;
display: block;
font-weight: bold;
color: #000000;
background-color: #EFF1EB;
width: 180px;
text-align: center;
padding: 4px;
text-decoration: none;
text-transform: uppercase;
border-style: solid;
border-color: #638529;
font-family: Arial, Helvetica, sans-serif;
border: 1px;
position: fixed;
}