Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By drupalfriend123 on
Hi,
I have two fieldsets in webform. First fieldset all are text fields and the 2nd fields sets have mixed field types.
I like to place all the labels to left and the fields to right.
Below code works just fine for first fieldset:
#block-webform-client-block-72 .M-CustomInfo .form-item {
padding: 5px 0 5px 100px;
position: relative;
}
#block-webform-client-block-72 .M-CustomInfo .form-item label {
left: 0;
position: absolute;
}
Below code does not work for 2nd fieldset. I guess it is because of mixed field types.
#block-webform-client-block-72 .M-EventInformation .form-item {
padding: 5px 0 5px 100px;
position: relative;
}
#block-webform-client-block-72 .M-EventInformation .form-item label {
left: 0;
position: absolute;
}
Can you please help placing labels to left and fields to right for the 2nd fieldset? Note this is for mobile app. So please make the screen 500px to see the form.
Thanks.
Comments
=-=
First find the correct class
First find the correct class for your css, then write the code.
You have added display none in the below property. This means when you try to hide something you have hide the wrapper not inner content.
You have did like this.
But you have to do like the below.
You have added an radio button. And you have added style for all labels including radio label.
So do like this.
The following line is for adding padding for fields.
Hope this will help you.
Thank you so much.
Thank you so much.
All worked except the radio field (Event Type). This field needed to be push right little. I did this for now and it worked unless you have better answer?:
Another question. How can I make all the fields size in EventInformation fieldset equal like the fields in CustomInfo fieldset?
Equal field size
Hi,
First lets see select box
Remove this line. because right side margin was 5px. so change this to 0. As following
Then, add this line
then, your webform calender add this few line.
If you can just add this class form-control you solve the problem.
Remove display:inline and add this
Finally, Number field remove following line.