Categories > TinyButStrong general >

Space (' ') appears in HTML tag

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Marcus
Date: 2005-02-17
Time: 14:03

Space (' ') appears in HTML tag

Hi Skrol,

Sorry to bother you again, but I am TBS newbie...

I have the following snippet:

<table border="0" cellpadding="2" cellspacing="2" bordercolor="#0000FF" style="font-size:14px;">
[bm.$;if [val] !=0; then ' '; else ''; magnet=table]
[bm;block=table;]
  <tr>
  <td [bs.$;if [val] !=0; then ''; else 'width=180';]>
   [bs.val;block=td;p1='[bm.$]';ifempty='&nbsp;';]
  </td>
  </tr>
</table>

In the line:
  <td [bs.$;if [val] !=0; then ''; else 'width=180';]>
I need the space after "<td " , however in the generated HTML code
the tag looks like <td >. How can this be avoided? Especially in
XHTML this is a bit annoying.

Thanks,
Marcus
By: Skrol29
Date: 2005-02-17
Time: 14:20

Re: Space (' ') appears in HTML tag

Hi Marcus,

There is no good way with the attribute's name in the 'else' parameter.
If you write ' width=180' and glue the TBS tag to the TD code, it won't be WHTML valide neither.

I have sometime the same probleme, and what I usually do is to refere to 2 CSS class names:
<td class="[bs.$;if [val]!=0;then 'class0';else 'classW']">
Then I code class0 and classW. class0 can be a class with no style, this is valid. classW: width=180px;