GNOME Bugzilla – Bug 635217
Merged cells with a border are missing the right edge in HTML 4.0
Last modified: 2013-04-22 22:39:41 UTC
Merged cells with a border are exported incorrectly to HTML 4.0. The "border-right" attribute is missing. Compare the generated HTML: <td valign="bottom" align="center" style=" font-size:10pt; border-top:thin solid #000000; border-left:thin solid #000000; border-right:thin solid #000000;">A</td> <td colspan="2" valign="bottom" align="center" style=" font-size:10pt; border-top:thin solid #000000; border-left:thin solid #000000;">AB</td> Note that "border-right:thin solid" is missing from the two column cell. Should be a simple fix. Tested with Gnumeric 1.10.1 from current Ubuntu.
Steps to reproduce: 1) Create spreadsheet with a merged cell. 2) Mark it with a four sided border. 3) Export to HTML. 4) Compare with unmerged cells.
Note that this is not specific to the right border. If the merge spans several rows it also affects the bottom border.
As well, empty cells get no border. This makes for surprises when a nice looking table on screen ends up with gaps in HTML.
I don't see the "empty cells get no border" in the html4.0 export (There aren't any borders in the html3.2 export) <p><table cellspacing="0" cellpadding="3"> <caption>Sheet1</caption> <tr> <td valign="bottom" align="left" style=" font-size:12pt;">x</td> <td style=" border-top:thick solid #000000; border-bottom:thick solid #000000; border-left:thick solid #000000; border-right:thick solid #000000;"></td> <td valign="bottom" align="left" style=" font-size:12pt;">x </td> </tr> </table>
What did you do to get no borders for empty cells?
Created attachment 174892 [details] Missing border on empty cell exported as HTML4.0 Ah. Turns out it is somewhat browser and quirks mode specific behavior. To make it work with all browsers is simple though, just add to otherwise empty cells that have borders, and you get the correct behavior. Screenshot of Firefox attached. You can see my hand-tweaked gnumeric output here: http://emerygoround.com/schedule.php
Regarding the empty cells with borders: please file bugs against the browsers that ignore borders on empty table cells. Gnumeric will not add content to empty cells to work around browser bugs.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.