在html表列之间添加边距 [英] Put a margin between html table columns

查看:122
本文介绍了在html表列之间添加边距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是IE9 +和FF / Chrome最新版本。




I am on IE9+ and FF/Chrome latest.

http://codepen.io/helloworld/pen/wmuGH

How can I put a margin between all columns that the table looks like a diagramm?

I do not want to use an empty dummy column between the real ones and set their width to fake the margin.

I have played a lot with padding and margin but either the rounded border at top is broken or the background-color of the diagramm columns are floating into the new created gap between the columns...

UPDATE:

There should be no gap between the rows.

just like this:

解决方案

Try this:

#responseTable  {
  border-collapse:separate; 
  border-spacing: 4px;
}

http://jsfiddle.net/qLumE/

这篇关于在html表列之间添加边距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆