我正在重新設計我的啓動頁面。目前,我已經能夠讓我的頁腳div在頁面底部運行,並以固定的位置爲中心,我將它用作菜單。然而,我遇到的唯一問題是,因爲這個頁腳/菜單div有一個透明的背景,如果它上面的內容div包含更多的信息,可以放在頁面上,文本顯示在頁腳/菜單div下方,菜單不可讀。有什麼方法可以讓內容div的高度僅運行到此固定頁腳/菜單的頂部,因此內容中的文本不會在下面運行?顯示固定頁腳div下面的內容div
我的CSS我已成立了,像這樣:
/*Global Settings*/
@import url(http://fonts.googleapis.com/css?family=Istok+Web);
* { margin: 0; outline: medium none; padding: 0; }
body { font: .9em 'Istok Web',sans-serif; background: url('../images/iQwallpaper.jpg') center center no-repeat fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; }
/*DIVS*/
div.header-outer { max-width: 100%; margin: 20px 20px 20px 20px; }
div.menu-outer { width: 100%; background: rgba(255,255,255,0.2); position: fixed; bottom: 0px; }
div.dashboard { max-width: 100%; max-height: 80%; overflow: auto; margin: 0 auto; }
div.left { float: left; }
div.right { float: right; }
/*MENU*/
#centeredmenu { float:left; width:100%; overflow:hidden; position:relative; }
#centeredmenu ul { clear:left; float:left; list-style:none; margin:0; padding:0; position:relative; left:50%; text-align:center; }
#centeredmenu ul li { display:block; float:left; list-style:none; margin:0; padding:0; position:relative; right:50%; }
#centeredmenu ul li a { display:block; margin:0; padding: 20px; color:#FFFFFF; text-decoration:none; }
#centeredmenu ul li a:hover { background:#369; color:#fff; }
#centeredmenu ul li a.dashboard { background: rgba(255,51,51,0.3); }
#centeredmenu ul li a.dashboard:hover { background: rgba(255,51,51,0.6); }
img.icon { height: 200px; display: inline; margin: 25px 50px 25px 50px; }
.white { color: #f2f2f2; }
標籤中的HTML如下:
<div class="header-outer">
<div class="left">
<h2 class="white">iQlaunch</h2>
</div>
<div class="right">
<p class="white">v 14.0.0 alpha</p>
</div>
<div class="clear"></div>
</div>
<div class="dashboard">
<p class="white">a bunch of text to get it to fill the page</p>
</div>
<div class="menu-outer">
<div id="centeredmenu">
<ul>
<li><a href="#" class="dashboard">Dashboard</a></li>
<li><a href="#">Customer Sites</a></li>
<li><a href="#">Support Tools</a></li>
<li><a href="#">Important Numbers</a></li>
<li><a href="#">Helpfiles for Everyone</a></li>
<li><a href="#">Helpfiles for Support</a></li>
<li><a href="#">Internal Sites</a></li>
<li><a href="#">Scheduling</a></li>
<li><a href="#">Staff Phone Directory</a></li>
<li><a href="#">Training Presentations</a></li>
<li><a href="#">Mobile News Sites</a></li>
</ul>
</div>
</div>
任何想法?