Jul06
W3C Valid removal of spaces between tables, rows and columns
on July 6th, 2011 at 7:33 pmPosted In: web development, web design, CSS, web development, web design, HTML, web development, web design, web development
Working 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).


















Stumble Upon
Del.icio.us
Buzz