Styling CSS in FormBuilder [solved]

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
Akha
New Member
New Member
Posts: 6
Joined: Mon Feb 21, 2011 4:45 pm

Styling CSS in FormBuilder [solved]

Post 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?
Last edited by Akha on Fri Feb 25, 2011 11:39 pm, edited 1 time in total.
uniqu3

Re: Styling CSS in FormBuilder

Post 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;}
Akha
New Member
New Member
Posts: 6
Joined: Mon Feb 21, 2011 4:45 pm

Re: Styling CSS in FormBuilder

Post 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.
Post Reply

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