Any tabstops in Squiffy?

I've got a data page to print out in squiffy, basically planet names, distance to sun, and so on. I'm afraid it's going to look pretty jumbled without some sort of control. Any ideas how to present this on a page (in squiffy, not JS)?

Squiffy outputs HTML, so you should probably use an HTML table if you want to layout data.
The main tags you'd want are "table", "tr" (table row), "th" (table heading cell), and "td" (table data cell)

Something like:

<table style="border-spacing: 1em 0; border-collapse: separate;">
<tr> <th>Name</th> <th>Size</th>   <th>Distance</th> </tr>
<tr> <td>Bob</td>  <td>7</td>      <td>7500</td> </tr>
<tr> <td>Tim</td>  <td>99</td>     <td>125</td> </tr>
<tr> <td>Earth</td><td>659995</td> <td>3</td> </tr>

would render looking like:

Name Size Distance
Bob 7 7500
Tim 99 125
Earth659995 3

(spaces in the code aren't necessary, I just added them to make it easier to read. You can adjust the style of the table to look however you want it)

Ding ding ding!

Right answer! You win the round!

Thanks a lot for that. It's exactly what I was looking for. And it takes variables too!

I'll be posting up what I'm attempting in a few days so you can see it in action.

This topic is now closed. Topics are closed after 60 days of inactivity.