Answer by Malvineous for Set cellpadding and cellspacing in CSS?
For those who want a non-zero cellspacing value, the following CSS worked for me, but I'm only able to test it in Firefox. See the Quirksmode link posted elsewhere for compatibility details. It seems...
View ArticleAnswer by Eric Nguyen for Set cellpadding and cellspacing in CSS?
Basics For controlling "cellpadding" in CSS, you can simply use padding on table cells. E.g. for 10px of "cellpadding": td { padding: 10px; } For "cellspacing", you can apply the border-spacing CSS...
View ArticleAnswer by corrector for Set cellpadding and cellspacing in CSS?
TBH. For all the fannying around with CSS you might as well just use cellpadding="0" cellspacing="0" since they are not deprecated... Anyone else suggesting margins on <td>'s obviously has not...
View ArticleAnswer by Pup for Set cellpadding and cellspacing in CSS?
table { border-collapse: collapse; /* 'cellspacing' equivalent */ } table td, table th { padding: 0; /* 'cellpadding' equivalent */ }
View ArticleAnswer by Will Prescott for Set cellpadding and cellspacing in CSS?
Setting margins on table cells doesn't really have any effect as far as I know. The true CSS equivalent for cellspacing is border-spacing - but it doesn't work in Internet Explorer. You can use...
View ArticleAnswer by mat for Set cellpadding and cellspacing in CSS?
Also, if you want cellspacing="0", don't forget to add border-collapse: collapse in your table's stylesheet.
View ArticleSet cellpadding and cellspacing in CSS?
In an HTML table, the cellpadding and cellspacing can be set like this: <table cellspacing="1" cellpadding="1"> How can the same be accomplished using CSS?
View ArticleAnswer by Greggo for Set cellpadding and cellspacing in CSS?
I suggest this and all the cells for the particular table are effected. table.tbl_classname td, th { padding: 5px 5px 5px 4px ; }
View ArticleAnswer by Amaresh Tiwari for Set cellpadding and cellspacing in CSS?
You can check the below code just create a index.html and run it.<!DOCTYPE html> <html> <head> <style> table{ border-spacing:10px; } td{ padding:10px; } </style>...
View ArticleAnswer by MattAllegro for Set cellpadding and cellspacing in CSS?
Say that we want to assign a 10px "cellpadding" and a 15px "cellspacing" to our table, in a HTML5-compliant way. I will show here two methods giving really similar outputs.Two different sets of CSS...
View ArticleAnswer by Muhammad Tahseen ur Rehman for Set cellpadding and cellspacing in CSS?
This worked for me:table {border-collapse: collapse}table th, table td {padding: 0}
View Article