[SOLVED] Form Builder - input box sizes

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
springall
New Member
New Member
Posts: 8
Joined: Fri Aug 10, 2012 8:30 am

[SOLVED] Form Builder - input box sizes

Post by springall »

Hi All.

I am having a little trouble with the styling of the Form Builder input boxes. I am currently using the Form Builder Module to create a contact form for a website I am working on.

The problem that I have is that the input boxes are not the same size when viewed in different browsers. When viewed in Firefox, the contact form is how I want it to look, but then viewed in Chrome or Safari, the input boxes are too small.

I have gone into the Form Builder CSS and changed:

Code: Select all

.contactform input {
	/*border: 1px solid #f60;*/
        width: 395px;
}
(adding the width: 395px;)
but doing this changes all the input boxes, including the Captcha input box and the Submit button.

Does anyone know how to just change the size of input boxes I want changed?

img1 = Form viewed in Firefox (this is how i want it to look on all browsers)
img1.jpg
img2 = Form viewed in Safari/Chrome (notice the boxes are too small)
img2.jpg
img3 = Form viewed in all browsers when CSS changed (width: 395px;)
img3.jpg
Thanks in advance
Tom
Last edited by springall on Thu Aug 30, 2012 1:59 pm, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Form Builder - input box sizes

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Form Builder - input box sizes

Post by Dr.CSS »

Every time you add a field in form builder you can give it a class name, this way you can target each input individually if you want, also check the page source to see what they already have for classes...
springall
New Member
New Member
Posts: 8
Joined: Fri Aug 10, 2012 8:30 am

Re: Form Builder - input box sizes

Post by springall »

Thanks for the reply Dr. CSS.

I have tried adding a class to the field. I have added the CSS class in the form builder css and my css:

Code: Select all

.formfields {
	width:470px;
}
I have then added .formfields in the css class box for one of the form fields as shown:
form class.png
I have tried with the . (.formfields) and without the . (formfields) but it still does not seem to work.

Thanks in advance
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: Form Builder - input box sizes

Post by JohnnyB »

formbuilder will place the class in the div that wraps the form control.

Try:
.formfields input { CSS Here }

But, you can target just the text inputs by using:
input[type='text'] { CSS Here }

similarly,
input[type='submit'] for submit buttons

Google HTML input types.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Post Reply

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