Is this possible via CSS?
We are trying
to no avail.
- You need to use padding on your td elements.
- Something like this should do the trick. You can, of course, get the same result using a top padding instead of a bottom padding.
- In the CSS code below, the greater-than sign means that the padding is only applied to td elements that are direct children to tr elements with the class spaceUnder.
- This will make it possible to use nested tables. (Cell C and D in the example code.) it shouldn’t break the code in any modern browsers.
This should render somewhat like this:
| A | B |
| C | D |
| | |
| E | F |
In the parent table, try setting
Plus a border declaration, and see if this achieves your desired effect. Beware, though, that IE doesn’t support the “separated borders” model.
You have table with id albums with any data,omitted the trs and tds
In the css:
since we have a background image behind the table, faking it with white padding wouldn’t work.
we opted to put an empty row in-between each row of content:
Then use css to give the spacer rows a certain height and transparent background.
You may try to add separator row:
you can do
Make sure the background color is set on the td rather than the row. This should work across most browsers…
You can use line-height in the table:
You need to set border-collapse: separate; on the table; most browser default stylesheets start at border-collapse: collapse;, which ditches border spacing.
Also, border-spacing: goes on the TD, not the TR.
If you apply float to tr elements, you can space between two rows with margin attribute.
For creating an illusion of spacing between rows, apply background color to row and then create a thick border with white color so that a “space” is created .
Simply put div inside the td and set the following styles of div: