表格行和边框
当我将 psd 转换为 html/css 时,我陷入了困境
页面是这样的: http:// /valogiannis.com/freelancer/neurosport/editdetails.html
在标题“编辑帐户详细信息”下方,我有一个表格来显示用户数据。
我对行有以下规则
#editAccountDetails tr {
border-bottom:#cdd3e0 solid 1px;
border-top:#fff solid 1px;
line-height:3;
}
正如您在页面中看到的,蓝色底部边框与白色顶部边框重叠。我在所有浏览器中得到相同的结果,所以我认为这是正常行为,这是我无法理解的。
我想要实现的是边框底部正好位于白色边框顶部上方。有什么建议吗?
PS 如果你知道的话,还有其他对我有帮助的事情。如何使最新行的 border-bottom 不出现,第一行的 border-top 不出现?我认为它类似于 tr + tr {... }
但我不太记得了。
I have stuck in a point when I convert a psd to html/css
The page is this : http://valogiannis.com/freelancer/neurosport/editdetails.html
Below the title "Edit Account Details" I have a table to show the user data.
I have I have the following rule for the rows
#editAccountDetails tr {
border-bottom:#cdd3e0 solid 1px;
border-top:#fff solid 1px;
line-height:3;
}
As you can see in the page the blue bottom-border overlap the white border-top. I get the same result in all browser so I suppose is normal behavior and it's something that I can't understand.
What I want to achieve is the border-bottom to be exactly above the white border-top. Any suggestion?
P.S Something else that would help me if you know. How can I make the border-bottom don't appear for the latest row and border-top for the first row? I think it's something like tr + tr {... }
but I don't remember exactly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你看不到边框的原因是因为这是在你的reset.css中,
将其添加到你的css中
你还需要删除从tr到td的边框
第一行的选择器是
:最后一行是:(最后一行在 ie 中不起作用)
The reason you cant see your borders is because this is in your reset.css
add in this to your css
You will also need to remove the borders from the tr to the td
And the selector for the first row is:
And the selector for the last row is: (last row doesnt work in ie)
试试这个
try this
只需将边界放在 TD 上而不是 TR 上,一切都会好起来:-)
Simply put borders on the TD instead of TR and all will be well :-)