鸿 网 互 联 www.68idc.cn

简单学习CSS实现网页布局的基础知识-Css

来源:互联网 作者:佚名 时间:2016-04-08 07:55
div id="navigation" ul lia This/a/li lia That/a/li lia The Other/a/li /ul /div div id="content" h1Ra ra banjo banjo/h1 pWelcome to the Ra ra banjo banjo page. Ra ra banjo banjo. Ra ra banjo banjo. Ra ra banjo banjo./p p(Ra ra banjo banjo)/

  <div id="navigation">
    <ul>
        <li><a >This</a></li>
        <li><a >That</a></li>
        <li><a >The Other</a></li>
    </ul>
</div>
<div id="content">
    <h1>Ra ra banjo banjo</h1>
    <p>Welcome to the Ra ra banjo banjo page. Ra ra banjo banjo. Ra ra banjo banjo. Ra ra banjo banjo.</p>
    <p>(Ra ra banjo banjo)</p>
</div>

  #navigation {
    position: absolute;
    top: 0;
    left: 0;

  #navigation {
    position: absolute;
    top: 0;
    left: 0;
    width: 10em;
}
#navigation2 {
    position: absolute;
    top: 0;
    right: 0;
    width: 10em;
}
#content {
    margin: 0 10em; /* setting top and bottom margin to 0 and right and left margin to 10em */
}

  #navigation {
    float: left;
    width: 10em;
}
#navigation2 {
    float: right;
    width: 10em;
}
#content {
    margin: 0 10em;
}

  #footer {
    clear: both;
}

  

网友评论
<