2013-01-24 66 views
4

问题出在这里。我有我的代码,所以我应该看到每个项目的顶部和底部的边框。不过,除了顶部的元素,我只能看到底部的内容。<tr> border top working but not border bottom

.tstyle1 { 
    margin: 10px 0 0 30px; 
    width: 950px; 
} 

.tstyle1 tr { 
    height: 120px; 
    border-bottom: 1px solid black; 
    border-collapse: separate; 
    border-top: 1px solid black; 
    border-bottom: 1px solid orange; 
} 

.tstyle1 td { 
    border: none; 
} 

这是重新创建的问题。 http://jsfiddle.net/fL3rx/

谢谢!

回答

7

尝试

加入display: block;.tstyle1 tr

+0

谢谢,你们俩! –

1

的问题是,你的下边框定义只是覆盖您的边框顶部的定义。所以下面的颜色不会显示。尝试设置border-bottom:none,你会看到顶部边框显示

@Pricey的建议做了一些神奇的事。