Formbuilder: Change width of input form

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
jonnytm
Forum Members
Forum Members
Posts: 14
Joined: Mon Jan 04, 2010 9:50 pm

Formbuilder: Change width of input form

Post by jonnytm »

Dear all

I have been trying to change the lenght of the inputs forms so all lines are the same size for at least 2h now. I have been searching the css and all options the formbuilder offers and could not find it. I am sure it's some *..arrgghh..* line that I just can't see right now. Can anyone help me with this?

Thanks heaps!!
Attachments
Bild 2.png
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm
Location: the Netherlands

Re: Formbuilder: Change width of input form

Post by M@rtijn »

This is how I did it, may not be the perfect way, but it is working!

Find the class for your formfields by searching in the html source code for your form page.

Look for lines that have an id to it and look like this:

Code: Select all

<label for="fbrp__48">Your name:</label>
<input type="text" name="m31ca3fbrp__48" value="" size="25" maxlength="128"  id="fbrp__48" />
Notice the id at the end. The number changes for every field. Remember these numbers

Then put in your CSS:

Code: Select all

#fbrp__48, fbrp__49 { width:200px; }
Make your community a better place!
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: Formbuilder: Change width of input form

Post by maranc »

Better is:

input[type="text"], input[type="password"], input[type="email"] {
width: 200px;}

You can always inlude your form in div or add id to form and use:

form#your_id, div#your_id {
input[type="text"], input[type="password"], input[type="email"] {
width: 200px;}


If first example - style will be used for all inputs, in second only for this id form or div.

Marek A.
Last edited by maranc on Wed Oct 27, 2010 12:04 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Formbuilder: Change width of input form

Post by Dr.CSS »

I think your second option will not work as you can't put item calls in {  }...

Just look at page source and find what to target and use css, I do it all the time and most of the forms have a class or ID on them now a days...
maranc
Forum Members
Forum Members
Posts: 249
Joined: Tue May 04, 2010 5:04 pm

Re: Formbuilder: Change width of input form

Post by maranc »

Sorry, its copy/paste mistake  ;), I was hurry up for footbal games  :D , yeah second option can't work . Good code:

form#your_id input[type="text"],
form#your_id input[type="password"], /* and more and more for form with specified Id*/
div#your_id input[type="text"],
div#your_id input[type="password"], /*the same you can  make for any forms, div's elements like textarea, submit, select ...*/

{
width: 200px;
}


BTW - I wrote in few post about thema: how change input in forms, etc.

Marek A.
Last edited by maranc on Wed Oct 27, 2010 12:06 am, edited 1 time in total.
jonnytm
Forum Members
Forum Members
Posts: 14
Joined: Mon Jan 04, 2010 9:50 pm

Re: Formbuilder: Change width of input form

Post by jonnytm »

Great, thanks guys! I will try this immediately.
Post Reply

Return to “Layout and Design (CSS & HTML)”