Column formatting in view on web

We have created the view with two columns i.e. emp name and depertment. we want to add space between these columns using TR and TD in column title on the web. How add space using TR TD ??

Subject: column formatting in view on web

You never need tr tags to add additional horizontal spacing, just td tags. If you decide to use them, you have to add those tags as passthrough HTML. In a column formula

or column head, that means you have to put them in square brackets like so

[ < th> ]

[ < td> ]

(do NOT insert the extra spaces, I just added them to keep the forum from stripping the

tag out). Do NOT provide a closing tag, as this will result in invalid HTML.

However, this approach is really primitive and results in semantically incorrect

markup and accessibility issues (apart from those that Domino might have generated

already by inserting its infamous ecblank.gif).

A much smarter and slicker approach is to use CSS for formatting. A common approach

is to include the embedded view (or $ViewTemplate field) in a div provided as passthrough

HTML and then use appropriate CSS selectors to provide the formatting you want. I

f you e.g. put the view into a div with an id attribute of “myView”, the CSS selectors

might be as simple as

#myView th {padding-right: 5px;}

#myView td {padding-right: 5px;}

Depending on if your view display categories or a response hierarchy, some more work

might be required.

Another option that requires just a little copy and paste on your part is to use

Stan Roger’s pretty_view JS found in the codebin on OpenNTF:

http://www.openntf.org/Projects/codebin/codebin.nsf/0/02D51176CA119145862571D6005FA4D3

It also depends on a div placed around the view, but applies all formatting dynamically

through JavaScript.

Subject: column formatting in view on web

Add on your form Passthru-HTML text with the correct tags. This text will be shown with a gray background on your form in the designer.

Alternatively you could add a dummy column. Note that you have to enter at least a single space in any row of this column (Passthru-HTML   will do).