HelloWorld
HelloWorld

Reputation: 4892

Put a margin between html table columns

I am on IE9+ and Firefox/Chrome latest.

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

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

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 diagram columns are floating into the new created gap between the columns...

UPDATE:

There should be no gap between the rows.

Just like this:

enter image description here

Upvotes: 1

Views: 2763

Answers (1)

Darren
Darren

Reputation: 70806

Try this:

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

http://jsfiddle.net/qLumE/

Upvotes: 6

Related Questions