Hi Quicksketch,
I've noticed that you periodically have Webform support requests for styling issues that can be solved with CSS. Anyway, I'm not familiar with how module documentation is handled, but thought posting a screenshot (attached) and the associated CSS might save you some time and support requests in the future.
/** WEBFORMS **/
.webform-client-form
{
}
.webform-client-form .form-item input.error, .form-item textarea.error
{
border: 1px solid #FF5C00;
color: #494949;
}
.webform-client-form .form-item
{
margin:0px;
margin-bottom: 7px;
}
.webform-client-form label
{
margin:0px;
width: 30%;
float: left;
text-align:right;
}
.webform-client-form label.option
{
width:auto; /*we don't want radio labels to follow the same rules as component labels*/
}
.webform-component-textfield, .webform-component-select, .webform-component-email,
.webform-component-select .form-radios
{
overflow:auto;
overflow:hidden;
height:100%;
}
.webform-component-textarea
{
width:50%;
float:right;
}
.webform-client-form .description
{
display:block;
clear:both;
line-height:normal;
color: #565656;
padding: 0px;
margin-top: -10px;
margin-left: 30%;
}
.webform-client-form .form-submit
{
margin: 20px;
}
~Joy
| Comment | File | Size | Author |
|---|---|---|---|
| webform_ss.png | 35.02 KB | sunshinee |
Comments
Comment #1
quicksketchExcellent, thanks Joy! The screenshot should really drive it home too. I'll mark this a patch so I can add it to the Webform handbook pages. Unfortunately the entire drupal.org contributed modules handbook is totally scrambled right now so there's no point in making the new page until that gets fixed.
Comment #2
maxferrario commentedWhen adding the infos to the documentation, please tell drupal users that they do not have to modify the webform.css file, as I tried to do, but the style.css file of theme they use.
Comment #3
devloper_sumi commentedThanx a lot... This was very much helpful for me....
But I am having one more requirement... how to add some text below the webform?
Comment #4
cdale commented@devloper_sumi - Add a markup component as the last component of the form, and put your text in there. Another option is to use a block below the form.
Comment #5
quicksketchdevloper_sumi, please keep conversation on-topic. See #268397: Text after form.
Comment #6
sunshinee commenteda little update:
upon using the basic CSS properties above in a couple of different drupal sites, it came to my attention that the negative margin on the form component descriptions can cause issues. If your default input filter uses Drupal's automatic line breaks (enabled by default on a new install), this is fine:
If you have disabled Drupal's automatic line breaks (i.e. to handle it through a wysiwyg editor), comment out or otherwise remove the negative margin as follows:
Hope this saves someone a headache! =)
Comment #7
quicksketchI've moved this to a handbook page at http://drupal.org/node/944430.
Comment #9
kyleheney commentedHow can I call a specific component of a specific Webform?
For example, I have this:
What I need to do is have my component "to" have a label around it, but only in the webform "853". How can I add on to the first group of code to call the "to" component of the "853" form?
I have tried this:
Nothing happens.
I think I just have things mixed up a bit and it's all in the way it needs to be written. I'm very beginner with all this, so a bit of help would be appreciated. The reason I need this to work is that I have the "to" component in other webforms on my site, so if I can't specify which form ID to call, it changes all instances of "to".
Thanks!
Comment #10
danchadwick commentedLooks like you are on the right track. Inspect the HTML and CSS in your browser until you see how to achieve what you want. Try the Drupal forums or IRC for general drupal themeing support.