Page 1 of 1

Styling CSS in FormBuilder [solved]

Posted: Mon Feb 21, 2011 5:12 pm
by Akha
Hello!

I have a great problem in styling a label in FormBuilder module. I have defined all labels in in "contactform" class to be aligned right. Here is the code:

Code: Select all

.contactform label {
	display: block;
	float: left;
	width: 120px;
	text-align: right;
	vertical-align: bottom;
	margin-top: 3px;
}
However, this affects also the last label in my form which is the label above the text area for a message. Now, I have tried to edit my CSS file so that the message label would be aligned left instead of right. Here is the code for that:

Code: Select all

.contactform label #message {
	text-align: left;
}
Yet it does not work. I have tried many different kind of variations of the above but without result. The class name is based in HTML code of the form. It looks like this:

Code: Select all

<div class="contactform">
							<fieldset id="fbrp__1"><legend>Tiedot</legend>
								<div class="required"><label for="fbrp__2">Nimi*</label><input type="text" name="mf085ffbrp__2" value="" size="25" maxlength="128"  id="fbrp__2" />
</div>
								<div class="required"><label for="fbrp__31">Matkapuhelinnumero*</label><input type="text" name="mf085ffbrp__31" value="" size="12" maxlength="12"   id="fbrp__31" />
</div>
								<div class="required"><label for="fbrp__3">Sähköpostiosoite*</label><input type="text" name="mf085ffbrp__3[]"  id="fbrp__3_1" value="" size="25" maxlength="128" /></div>
								<div><label for="fbrp__5">Aihe</label><input type="text" name="mf085ffbrp__5" value="" size="25" maxlength="128"  id="fbrp__5" />
</div>
								<div class="required"><label for="message">Viesti:*</label><textarea name="mf085ffbrp__6" cols="60" rows="5" id="message">Enter Your Message Here</textarea>
Can anyone help me with this?

Re: Styling CSS in FormBuilder

Posted: Mon Feb 21, 2011 5:53 pm
by uniqu3
You should add a classname for your textarea field in FormBuilder by clicking on tab Advanced Settings and adding a value in "CSS class for this field".

Then you can change your label with .yourtextareaclass label {some:value;}

Re: Styling CSS in FormBuilder

Posted: Tue Feb 22, 2011 5:00 pm
by Akha
I actually noticed myself that I can add a new class for a certain field, so I already used that solution (although I named the class differently). But thank you nevertheless.