日期:2014-05-17  浏览次数:20871 次

Dreanweaver里显示跟在浏览器中显示不一样,不知道哪里错了,div加不上边框
我想要这样的显示效果

结果成这样的了

源代码
HTML code

<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
    
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->

    <script type="text/javascript" src="js/jquery-1.7.2.js"></script>
    <script type="text/javascript">
        $(".navitems li a").click(function(){
            $(".navitems li a").css("background","url(images/libg.png)");
        });
    </script>
    <style type="text/css">
        div{ border:1px solid #666}
        .newsbody{ width:1000px; margin:0 auto;}
        .content{ width:998px; margin:0 auto; padding-top:10px; border:1px solid #999; border-bottom:none}
        .nav{ background:url(images/navbg.png) top left;width:1000px; height:30px; line-height:0px; overflow:hidden; margin: 0 auto;}
        .navitems{ list-style:none;}
        .navitems li{ float:left; margin-right:10px; margin-left:0px; border-right:#FFC; border:1px;}
        .navitems li a{ text-align:center; color:#FFF; text-decoration:none; font-size:15px;  vertical-align:middle}
        .navitems li a:hover{text-decoration:underline};
        .hotnews{ width:700px; height:400px;}
        .hotnews div{ float:left}
        .banner{
    position:relative;
    left:0px;
    width:700px;
    height:30px;
    background:url(images/banner.png);
    text-align:left;
    line-height:30px;
    overflow: hidden;
    background-color: #FFFFFF;
}
        .hotnewsitems{ width:450px; height:360px; position:relative; left:0px; margin-top:10px; overflow:hidden}
        .news{ list-style:circle;}
        .news li{ margin-top:10px;}
        .news li a{ text-decoration:none;}
        .news li a:hover{ text-decoration:underline;}
        .gundong{ margin-left:10px; width:230px; height:195px; position:relative; margin-top:10px;}
        .hotvideo{ width:230px; height:155px; margin-left:10px; margin-top:10px;}
    </style>
 
  </head>
  
   
  <body>

  <div class="nav">
        <ul class="navitems">
            <li style="padding-left:0px"><a href="#">新闻首页</a></li>
            <li><a href="#">国内</a></li>
            <li><a href="#">国际</a></li>
            <li><a href="#">军事</a></li>
            <li><a href="#">财经</a></li>
            <li><a href="#">互联网</a></li>
            <li><a href="#">房产</a></li>
            <li><a href="#">汽车</a></li>
            <li><a href="#">体育</a></li>
            <li><a href="#">娱乐</a></li>
            <li><a href="#">游戏</a></li>
            <li><a href="#">体育</a></li>
            <li><a href="#">女人</a></li>
            <li><a href="#">科技</a></li>
            <li><a href="#">社会<