Page 1 of 1
Table Cell Spacing question
Posted: Sun Sep 06, 2009 12:03 pm
by vega
In the Table Properties dialog, The Cell Spacing control allows for a value of -1.
When exporting RVF's to HTML with a cell spacing of -1, a 1px border is shown when viewed in Firefox. It doesn't show in IE 6 or Opera.
Could you tell me why this value of -1 and when should it be used? what is the purpose of it ?
Thanks
.
Posted: Sun Sep 06, 2009 3:52 pm
by Sergey Tkachenko
If CellBorderWidth=1 and cell spacing = -1, borders overlap and you can see 1 pixel border between cells instead of 2 pixels.
This setting cannot be saved in HTML without CSS (SaveHTML), because HTML does not allow negative cell spacing. However, when using CSS (SaveHTMLEx), TRichView writes style 'border-collapse: collapse;' for such tables, that should do a similar thing for merging adjacent borders in browsers.
Posted: Mon Sep 07, 2009 7:45 am
by vega
Ok, thanks. I save html to stream with the following settings:
Code: Select all
RichViewEdit1.SaveHTMLToStreamEx(streamRVEHtml,'','','','','','',
[rvsoMiddleOnly, rvsoUseItemImageFileNames, rvsoImageSizes,
rvsoNoHypertextImageBorders, rvsoMarkersAsText, rvsoNoDefCSSStyle,
rvsoInlineCSS]);
At saving to html time, the table is defined as follows:
Code: Select all
<table border=1 cellpadding=0 cellspacing=-1 style="border-color: #000000; border-style: solid; border-collapse: collapse;">
Firefox interprets the "cellspacing=-1", which shows a 1px border. Opera and IE don't do that.
This is confusing my users and I therefore need to eliminate the "-1" option from the Cell spacing dropdown of the Table Properties dialog. Which source module do I have to edit to achieve that?
Thanks.
Posted: Mon Sep 07, 2009 11:39 am
by Sergey Tkachenko
It's strange, my tests have opposite results: a desired 1 pixel border is shown in: Opera, IE8, Chrome. Only FireFox does not join borders.