On Jan 1, 2008 10:30 AM, Przemek Gawronski <[EMAIL PROTECTED]> wrote:
> > > can you explain a bit clearly what you want to do? > > If I have a form (newform) with a ImageFiled (probably the same with a > FileField) and in the template I use {{ form }} to display this form, > the text field and the button you press to select a file are right next > to each other, and I want some space between them. > I don't know if this can be done. It's not a limitation of Django but rather of the input type=file HTML control. Django lets you specify attrs for the FileInput widget, but I haven't found any that provide spacing between the text input box and the browse button. You can change the size of the text box by specifying a "size" attr. However, CSS style attributes seem to apply to the two things together, thus for example a margin-right specification puts a margin to the right of the browse button, not to the right of the text input box. I've found a few pages that talk about the difficulty of styling this control. This one in particular I thought was good: http://www.cs.tut.fi/~jkorpela/forms/file.html#present It's got a lot of pointers to other references so perhaps if you follow them further than I did you could find something that will help, though I tend to doubt it. This control sounds notoriously difficult to customize. Karen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---