I am trying to eliminate some white space in my table cells. I looked up how to code this in stack overflow, they suggest setting the height and width values equal to 100%. This doesn't produce the desired result. Anyone have any suggestions?
I'm a little thrown by the title, which suggests you're wanting an image to expand to fill the cell. It sounds like what you're really wanting to do is remove the whitespace from around the image.
If you're in the Rich Content Editor, you can click on the Table icon, choose Table Properties and set Cell Padding to 0.
Related to that is Cell Spacing, and I usually set both to 0, but it's a matter of taste.
In HTML, your table line ends up looking like this:
<table cellspacing="0" cellpadding="0">
Cell spacing is the distance between cells. Cell padding is the distance from the edge of the cell to the contents inside the cell.
That said, both cellspacing and cellpadding have been deprecated and should no longer be used. But the same note says that it will probably still work.
The preferred way is to use border-collapse on the table and padding on the cell. You would click on the table icon, choose table properties, advanced, and then enter: border-collapse: collapse;
Without the border-collapse; you'll still have spacing between the cells.
To get the padding to 0, you can do this by highlighting the entire table, clicking on the table icon, choosing cell, then cell properties, going to advance, and then putting in: padding: 0px;
Alternatively, if you just want the image to fill up the entire cell but want whitespace around the rest of the cells, then you can set the style to padding: 0px; for just that one cell.
Simplicity says just change the cellspacing=0 and cellpadding=0 and that Canvas should upgrade their editor to do it the proper way, but there are so many tables on the internet that use cellspacing and cellpadding that even though it's deprecated, it's going to be around for a long, long time.
Retrieving data ...