Junkie
02-20-2004, 03:08 AM
What's the difference between cell spacing and cell padding? And when do you use each?
![]() | View Full Version : Cell Spacing vs. Cell Padding Junkie 02-20-2004, 03:08 AM What's the difference between cell spacing and cell padding? And when do you use each? XiaoKao 02-21-2004, 01:26 AM Cell spacing controls the distance between the cells. To specify cell spacing and it's distance, you add the line CELLSPACING="X" to the <TABLE> tag so the final result looks like: <TABLE CELLSPACING="X"> The X in the line, is replaced with the number of pixels you want between the cells. --- Cell padding controls the distance between the text in the cell and edge of the cell. Cell Padding controls the distance between the text in the cell and the edge of the cell. To specify cell padding and it's distance, you add the line CELLPADDING="X" to the <TABLE> tag so the final result looks like: <TABLE CELLPADDING="X"> The X in the line, is replaced with the number of pixels you want between the text and cell edge. 1jetsam 02-21-2004, 06:44 PM I personally don't like to use them, but i'll also give an example. Its sortof like the space between the body in the way... nervermind, its too hard to explain at this moment. RMF 02-21-2004, 09:04 PM You don't always want your text right up on the edge of the table.. Like, look at your username in the thread. Without cellpadding/cellspacing, your name would be right next and right below the border lines. It would look sloppy. RMF mwalters 02-22-2004, 03:26 AM Sidenote ... I prefer using CSS for this just because you can control the left/right/top/bottom independently. Sometimes important when you're trying to get graphics and text to line up with each other correctly. |