Pacific Trails Resort offers a special lodging experience on the California North Coast,Relax in serenity with panoramic views of the pacificOcean.
Copyright©2011 Pacific Trails Resort
logchou@sina.com
css文件:
body{
background-color: #ffffff;
color: #666666;
background-image: url(bg.jpg);
background-repeat: no-repeat;
font-family: Arial,Helvetica,sans-serif;
background-attachment: fixed;
}
#wrapper{
margin: auto;
width: 80%;
min-width: 960px;
background-color: #ffffff;
box-shadow: 5px 5px 5px #000033;
min-height: 500px;
}
h1{
background-color: #90c7e3;
color: #ffffff;
background-position: right;
background-repeat: no-repeat;
height: 60px;
padding-top: 20px;
font-family: Georgia,"Times New Roman",serif;
margin-bottom: 0;
}
#nav{
background-color: #90c7e3;
font-weight: bold;
float: left;
width: 140px;
display: block;
margin: auto;
}
#nav ul{
list-style-type: none;
padding:0;
margin: 0;
font-size: 1.2em;
#nav a{
text-decoration: none;
border-bottom: #000000 solid .1em;
display: block;
padding: 0;
}
#nav a:link{
color: #ff0000;
}
#nav a:visited{
color:#ff1100;
}
#nav a:hover{
color: #0000ff;
}
h2 {
font-family: Georgia,"Times New Roman",serif;
color: #3399cc;
text-shadow:1px 1px 1px #ccc;
}
#content{
color: #000000;
padding: 1px 20px 20px 30px;
background-color: #ffffff;
margin-left: 150px;
overflow: auto;
}
#content img{
float: left;padding-right: 20px;
}
#content ul{
list-style-position:inside;
}
.resort{
font-weight: bold;
color: #000033;
}
h3{
color: #000033;
font-family: Georgia,"Times New Roman",serif;
};
#contact{
font-size: 90%;
}
#footer{
font-size: 75%;
font-style: italic;
font-family: Georgia,"Times New Roman",serif;
text-align: center;
clear: both;
}
這樣弄出來的界面,左側(cè)導航欄只有一小塊,背景不能完全覆蓋,這該怎么做呢,要是設(shè)置一個固定的高度。一旦網(wǎng)頁內(nèi)容改變了肯定又不行了,我前面做過差不多的這種網(wǎng)頁,但是導航欄float之后能自動調(diào)節(jié)高度。這個不行了,不知道該怎么解決。求高手解答。
#wrapper{overflow:hidden;}
#nav{padding-bottom:10000px;margin-bottom:-10000px;}
把上面樣式加到對應(yīng)地方。
這個真的可以誒。不過為什么呢。我原來也弄過一個類似的,可是不用加這些,也不用設(shè)置高度什么的。就會自動填上了。
#content {background-color: #fff;overflow: hidden;}
#wrapper 加上 {background-color: #90c7e3;}
h1和#nav 去掉 {background-color: #90c7e3;}
這樣修改就行了
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com