W3C Valid removal of spaces between tables, rows and columns
on July 6th, 2011 at 7:33 pmWorking on an older site or with tables and need to remove spaces for image mactch-up or continuous backgrounds?
You will need to update your table elements. Remove cellpadding, cellspacing and border controls and replace them with CSS.
- make sure each table element has at least
style="margin:0; padding:0; border:none;"
- place similar CSS code (in 1 above) into all images within the table elements
- Use the global CSS
table {border-collapse:collapse;}
You may have to tweak vertical-align to top or bottom for image alignments, but the spaces should now be gone.
Have Fun! Visit our HTML Playground (now in HTML5).