This is a novice question about displaying views - I’d be greatful for a pointer to the answer which I can’t find!
I’m trying to create a project chart using HTML. I’ve created a view with 19 columns, 16 of which are reduced to the thinnest possible size and contain a formula that will create the HTML, such as
redbar.gif is a 16 by 16 gif containing a red bar.
When this view is displayed in the browser, instead of getting one long line I get 16 graphics with some sort of padding between them. If I turn off margins a make the columns as small as possible, I sill get this effect - how do I turn off the spacing?
Subject: Cell Padding - the spacing between columns when a view is displayed in a browser
Hi Steve,
First of all, I think your problem is caused by the fact that you haven’t specified ‘cellpadding’ or ‘cellspacing’ in your ‘
’ tag (which I don’t think you’ve defined either).
By default, if it’s not specified, your browser will assume both parameters are set to ‘2’. So to ensure there is no spacing whatsoever you need to specify the following:
I normally do this by creating a Form called ‘$$ViewTemplateDefault’ or ‘$$ViewTemplateNameOfYourView’.
In this Form, you have a field called $$ViewBody (Computed to itself) which will contain your view when you open it. Above this field, use the above table tag as Pass-Thru HTML, then below the field, specify
as Pass-Thru HTML.
Please reply if anything isn’t clear or if it doesn’t answer your question.
Subject: Cell Padding - the spacing between columns when a view is displayed in a browser
Unless this can be chalked up to a simple matter of “great minds think alike” (and I speak here of the “inchart” class for your images), this seems to be adapted from something I did. If that’s the case, you should be aware that mine was done using “Treat view contents as HTML”, which allowed me to both set the cellpadding, cellspacing and border attributes of the table tag in my own HTML, and to class every element for CSS. The “inchart” , for instance, was defined as 15 by 15 pixels with no border.
Not that it can’t be done in a more Notesy kind of way, but the cellpadding and cellspacing HTML attributes are not exactly equivalent to the margin and padding that you can set in CSS.
Subject: RE: Cell Padding - the spacing between columns when a view is displayed in a browser
Lee - that was exactly what I was looking for. Thanks for your help - I just couldn’t find that anywhere but now I know how to do it, it seems obvious!
Stan - Yes, I’m copying one of your ideas. I have a holiday requests database where people view their calendar and department calendars over the web. I came across a posting of yours on OpenNTF talking about this and thought it was a brilliant idea so I pinched it and adapted it to my needs. And then discovered that I don’t know how to display views in HTML which I’ve now learned! Thanks for the inspiration
Subject: RE: Cell Padding - the spacing between columns when a view is displayed in a browser
You are welcome. I have always posted with the expectation that someone might find my blathering useful. I just thought I noticed something just a little bit wonky in your implementation, so I thought I’d fill in the details a bit.