spacing cells and columns within <table>

genius_geek
genius_geek used Ask the Experts™
on
Hi

I have a table with 3 rows and 6 cols

struct as follows:

r1c1
r1c2 with colspan 5

r2c1
r2c2 with colspan 5

r3c1
r3c2
r3c3
r3c4
r3c5
r3c6

r4c1
r4c2
r4c3
r4c4
r4c5
r4c6

r5c1
r5c2 with colspan 3
r5c3
r5c4

r6c1
r6c2 with colspan 2
r6c3
r6c4
r6c5

This structure works as expected. But the display is congested. How do i space out the cells evenly? Is there a css for it?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
LZ1
Top Expert 2011

Commented:
For a table you could use something like this:

table tr td{padding:5px;}

Open in new window

Top Expert 2011
Commented:
Or you could use the table cellpadding or cellspacing, but I don't like doing that because it's not really semantic and you should be setting the stuff in CSS.

<table width="100%" cellspacing="3" cellpadding="3">

Open in new window

Author

Commented:
Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial