Reputation: 5996
I'm trying to set certain margin between two table rows.
I'm using following code snippet in css:
background-color: #72c2dd;
margin-top: 25px;
background-color
gets applied but margin-top
doesn't work. (refer below screenshot)
This is the issue with whole table.
All other properties are working properly but there is some issue with margin
.
Any help appreciated.
Image on the left is how it should be and the image on the right is how it is getting displayed (without margin top to the second row).
Upvotes: 0
Views: 509
Reputation: 3117
If you have only one column then "cellspacing" will solve the problem;
Or else you can use a white top border for rows of width 25px;
Upvotes: 0
Reputation: 475
Use border-top instead, border-top: 25px solid white original try table-layout http://www.w3schools.com/cssref/pr_tab_table-layout.asp and set custom height to that cell
Upvotes: 1
Reputation: 106
Table cells do not have margins to change. You can, however, change the padding of the cells. Another trick you could try would be adding a transparent border to the upper part of the row using something such as:
border-top: 5px solid transparent;
Upvotes: 1