views:

72

answers:

1

I have several values I'm rendering as <li> elements on my template and I want to further this by having them arranged into equal (or near-equal columns) automatically in the template. How can I achieve this?

So far I'm rendering all the values as

<ul>
   {% for feature in features %}
      <li>{{ feature }}</li>
   {% endfor %}
</ul>
A: 

What about styling each li with style="float:left; width: {% width %}px;"

All you have to do is calculate the width parameter... eg width = 1000/features.length;

PHP_Jedi
If it's let-to-right, fine. Top-to-bottom, more difficult :)
Diodeus
@PHP_Jedi: I'll give this a show and see if it helps...I'll let you know@Diodeus: I had initially wanted top-to-bottom, but left-to-right can still work fine
Stephen