Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS table cellpadding and cellspacing?

Tags:

html

css

Possible Duplicate:

How to set cellpadding & cellspacing in CSS?

i have a little problem, i don't know how i can make my CSS style to remove cellpadding and cellspacing.

i hobe i can be helpet.

like image 350
ParisNakitaKejser Avatar asked Aug 16 '09 19:08

ParisNakitaKejser


2 Answers

table {  
    border-collapse: collapse;
}
th, td {
    padding: 0;
}
like image 69
chrissr Avatar answered Oct 14 '22 15:10

chrissr


The accepted answer of border-collapse:collapse; is not the right way to get rid of cellspacing. It works for simple solid border styles, but it is easily seen to be wrong if td{border} is set to something complicated, like inset or outset. The right answer is border-spacing:0;

like image 41
Adam Chalcraft Avatar answered Oct 14 '22 16:10

Adam Chalcraft