2013-11-22 49 views
0

在记事本++中,从margin-top开始的margin命令不会被识别为关键字。这意味着在我的网站中,即使代码是正确的,它也不会将顶部边距或填充设置为所需的大小。上边栏和下边栏都有同样的想法。请帮忙!!未识别HTML5/CSS3裕量命令

.top-sidebar { 
    width: 21%; 
    float: left; 
    background-color: #FFFFFF; 
    border-radius: 5px; 
    -moz-border-radius: 5px; 
    -webkit-border-radius: 5px; 
    margin-left: 3%; 
    margin-bottom: 2% 
    margin-top: 2% 
    margin: 2% 0 2% 3% 
    padding: 2% 3% 
} 

.bottom-sidebar { 
    width: 21%; 
    float: left; 
    background-color: #FFFFFF; 
    border-radius: 5px; 
    -moz-border-radius: 5px; 
    -webkit-border-radius: 5px; 
    margin-left: 3%; 
    margin-bottom: 2% 
    margin-top: 2% 
    margin: 2% 0 2% 3% 
    padding: 2% 3%; 
} 

回答

1

您有一些语法错误,这就是为什么它不能识别您的保证金属性。请记住使用;

试试这个:

.top-sidebar { 
    width: 21%; 
    float: left; 
    background-color: #FFFFFF; 
    border-radius: 5px; 
    -moz-border-radius: 5px; 
    -webkit-border-radius: 5px; 
    margin-left: 3%; 
    margin-bottom: 2%; 
    margin-top: 2%; 
    margin: 2% 0 2% 3%; 
    padding: 2% 3%; 
} 

.bottom-sidebar { 
    width: 21%; 
    float: left; 
    background-color: #FFFFFF; 
    border-radius: 5px; 
    -moz-border-radius: 5px; 
    -webkit-border-radius: 5px; 
    margin-left: 3%; 
    margin-bottom: 2%; 
    margin-top: 2% ; 
    margin: 2% 0 2% 3%; 
    padding: 2% 3%; 
} 
+0

感谢的人!愚蠢的错误... – user3022957

+0

@ user3022957没问题。我们都是人类! – agconti

+0

@ user3022957如果这回答了您的问题,您能接受答案吗?谢谢! – agconti