Categories > TinyButStrong general >

CSS instead of html/table

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Matthias
Date: 2004-05-27
Time: 13:00

CSS instead of html/table

First: Tinybutstrong is the best template-system!

But I have small problem. I want to use CSS instead of Html-tables and I
don't know how to make it. My Page which is a "newspage" loads all
entries from a mysql-database (like the example data/mysl)

I found out that the code [blk1;block=tr] has to be there if I want to show all
entries (when I delete the table there is only the last entry and the word "array" appears).

How can I make this template tabless?

Help me!

Thank you

template-code:

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="794" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="794" border="0" align="center" cellpadding="0" cellspacing="0">
        [blk1;block=tr]
        <tr>
          <td width="158" align="left" valign="top"><img src="[blk1.pic]" width="158" height="158"></td>
          <td width="625" align="left" valign="top" class="info_news"><p class="info_news">[blk1.id]
              | [blk1.datum] | [blk1.autor]</p>
            <p class="headline_news">[blk1.headline]</p>
            <p class="subline_news">[blk1.subheadline]</p>
            <p class="fliesstext_news">[blk1.text;htmlconv=no]</p>
            <p class="fliesstext_news">&nbsp;</p>
            <p class="fliesstext_news"><a class="exlink" a href="[blk1.link]" target="_blank">[blk1.link]</a></p>
            <p>&nbsp;</p></td>
        </tr>
        <tr align="left" valign="bottom">
          <td height="45" colspan="2" valign="bottom"><img src="illus/illu_beta_trennstrich.gif" width="794" height="18"></td>
        </tr>
      </table></td>
  </tr>
</table>
By: Skrol29
Date: 2004-05-27
Time: 16:44

Re: CSS instead of html/table

Hi Matthias,

You can use the explicit Block syntax.
Example: [blk1.block=begin]...HTML...[blk1.block=end]

I also recall that you can define a block using a TBS Field tag.
That's the simplified syntax.
Example : [blk1.id;block=tr]

And parameters 'expend' and 'encaps' can help to refine the block definition.

You can drop Html Table usage by replacing them with CSS Layers.
A Layer is defined using a DIV tags. So you just have to define the TBS block on it. But you will have to manage the Heigth Layer's property.
By: Matthias
Date: 2004-05-27
Time: 19:06

Re: CSS instead of html/table

Perfect! Thank you very much, lifesaver!