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

帮看一下jsp页面样式的问题。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
为什么right的div边框不显示啊??????????
求修改,兼容ie6,7,8
HTML code

<html>
    <head>
        <style type="text/css">
            .main{border:none;width:100px;height:100px;}
            .left{border:1px solid red;width:50px;height:100px;position:relative;float:left;}
            .right(border:1px solid red;width:50px;height:100px;position:relative;float:left;)
        </style>
    </head>
    <body>
        <div class="main">
            <div class="left">left</div>
            <div class="right">right</div>
        </div>
    </body>
</html>




------解决方案--------------------
你要一样的边框要两个class干啥呢
HTML code

<div class="main">
            <div class="left">left</div>
            <div class="left">right</div>
        </div>

------解决方案--------------------
.right(border:1px solid red;width:50px;height:100px;position:relative;float:left;)
括号错了