This css should do it:

ul {list-style-image:none;list-style-position:outside;list-style-
type:none; float:left}
ul li {width:50%;display:block;float:left}

What this does, is that it gives every list element 50% of available
width (if you want 3 columns then put it to 30%), display block is
actually not necessary, i just added it to be sure it works in IE too
- i tested it in firefox.

If you want to see all the markup & css go here :
http://www.frukt.ee/public/alan/test/test.html

If you want the elements to be sorted in different way - first 10 in
one column and next 10 in another, then css cant do and you have to
follow advice given by Tom.

Alan.
On Apr 22, 10:33 am, Konstantin S <ktechli...@gmail.com> wrote:
> On Apr 22, 9:29 am, zayatzz <alan.kesselm...@gmail.com> wrote:
>
> > I wish i could see the html output of your program. But you have to
> > use either divs or ul&li elemnts to wrap that list and make it look
> > nice in template.
>
> > But i think the problem is that your widget output is just a list of
> > checkboxes, that you cant iterate in a template, so wrapping them is
> > impossible?
>
> Yes, you are right. Generated html looks like this:
>
>  <label for="id_boxes_0">Boxes</label>:
> <ul>
> <li><label for="id_boxes_0"><input type="checkbox" name="boxes"
> value="1" id="id_box_0" /> Box 1</label></li>
> ...
> <li><label for="id_boxes_29"><input type="checkbox" name="boxes"
> value="30" id="id_boxes_29" /> Box 30</label></li>
> </ul>
>
> I can't iterate through individual <li> and mark them in some way or
> split this single <ul> into two lists.
>
> I don't want to create a great design, I am neither an experienced
> web developer nor a web-designer, I just want it to look not so
> awkward.
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to