视频1 视频21 视频41 视频61 视频文章1 视频文章21 视频文章41 视频文章61 推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37 推荐39 推荐41 推荐43 推荐45 推荐47 推荐49 关键词1 关键词101 关键词201 关键词301 关键词401 关键词501 关键词601 关键词701 关键词801 关键词901 关键词1001 关键词1101 关键词1201 关键词1301 关键词1401 关键词1501 关键词1601 关键词1701 关键词1801 关键词1901 视频扩展1 视频扩展6 视频扩展11 视频扩展16 文章1 文章201 文章401 文章601 文章801 文章1001 资讯1 资讯501 资讯1001 资讯1501 标签1 标签501 标签1001 关键词1 关键词501 关键词1001 关键词1501 专题2001
css双栏布局遇到了一个问题_html/css
2020-11-27 16:03:49 责编:小采
文档



Pacific Trainls Resort




Pacific Trails Resort




  • Home

  • Yurts

  • Activities

  • Reservations




  • Enjoy Nature in Luxury



    Pacific Trails Resort offers a special lodging experience on the California North Coast,Relax in serenity with panoramic views of the pacificOcean.



  • Private yurts with decks overlooking the ocean

  • Activities lodge with fireplace and gift shop

  • Nightly fine dining at the Overlook Cafe

  • Heated outdoor pool and whirpool

  • Guided hiking tours of the redwoods



  • Pacific Trails Resort

    12010 pacific Trails Road
    Zephyr,CA 95555
    888-555-5555









    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;



    }

    这样弄出来的界面,左侧导航栏只有一小块,背景不能完全覆盖,这该怎么做呢,要是设置一个固定的高度。一旦网页内容改变了肯定又不行了,我前面做过差不多的这种网页,但是导航栏float之后能自动调节高度。这个不行了,不知道该怎么解决。求高手解答。


    回复讨论(解决方案)

    #wrapper{overflow:hidden;}
    #nav{padding-bottom:10000px;margin-bottom:-10000px;}


    把上面样式加到对应地方。

    这个真的可以诶。不过为什么呢。我原来也弄过一个类似的,可是不用加这些,也不用设置高度什么的。就会自动填上了。

    #content {background-color: #fff;overflow: hidden;}
    #wrapper 加上 {background-color: #90c7e3;}
    h1和#nav 去掉 {background-color: #90c7e3;}

    这样修改就行了

    下载本文
    显示全文
    专题