Table Cell Spacing question

General TRichView support forum. Please post your questions here
Post Reply
vega
Posts: 50
Joined: Fri Oct 26, 2007 6:29 am

Table Cell Spacing question

Post 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

.
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
vega
Posts: 50
Joined: Fri Oct 26, 2007 6:29 am

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Post Reply