RajeshD wrote: > > 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"> </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 > I'd change "clear_all" to "clear-all" if I was you. I've had trouble with some older versions of Netscape choking on underscores.
Cheers, Dean --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---