On Nov 2, 4:05 pm, "Ramdas S" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am sure there is something absolutely simple, but I guess I am missing it.
> I need to display some content/ news articles over 3 columns on a home page,
> where the order is latest stories coming in top rows from left to right. If
> you've seen web sites like theinquirer.net or theregister.co.uk you will
> understand what I mean!
>
> I was searching for a solution that is a lot simple, like a template tag
> which will let me implement this easily. But I have not found one.

Have you considered using plain CSS floating boxes?

Here's some hastily put together snippet:

Your template:
----------------------

{% for a in articles %}
   <div class="article">
     .... render article a here
   </div>
  {% if forloop.counter1|divisibleby:"3" %}
     <div class="clear_all">&nbsp;</div>
  {% endif %}
{% endfor %}

Your CSS:
------------------

.article {width:32%;float:left;overflow:hidden;}
.clear_all {clear:both;}

Experiment further to make things look nicer from here ;)

-Rajesh D


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to