On 15/03/2013 4:25pm, Mike Dewhirst wrote:
On 15/03/2013 11:05am, cabrazil wrote:
Hi,

I have the same problem. Have you recieved any help?
Thanks.

Em segunda-feira, 3 de setembro de 2012 07h09min22s UTC-3, mapapage
escreveu:

    Hi all!
    I'd like to know if there's a way to resize my modelform fields on
    the template. They're being rendered too big for the text input.
    I tried this :

       name  =  forms.CharField(
                    widget=forms.TextInput(attrs={'size':'40'}))

    but it didn't work.


Try this in your css ...

.field-<fieldname> .vLargeTextField {
     width: 40px !important;
     height: 40px;
}

or for all TextField ...

.vLargeTextField {
    width: 40em !important;
    height: 40px;
}

or all ordinary CharField ...

.vTextField {
    width: 30em !important;
    height: 40px;
}

I haven't played with the widgets but the docs will possibly tell you the attributes are rows and cols rather than size.

Mike





    I also changed the width in css but unsuccessfully.

    Do you have any solution to suggest?

    Thx!

--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to