The definition of frustration should be something about expecting a task to be short and simple but instead it takes a really long time. So it was with centering the submit button on a Drupal webform. Now, I dont want to give you the wrong impression, because the Drupal webforms module is fantastic. Right out of the box it did 95% of what I needed. Another 4% was fairly easy to accomplish by adding code to the Webform advanced settings ->
Additional Processing section. The last 1% was a bit trickier to figure out, which was controlling the position and layout of the submit button.
\n\n
An implicit assumption is that most websites want to `brand or customize their buttons. Is this a fair assumption? Heres the default submit button of a Drupal webform.
\n\n
\n\n
Please, someone correct me if Im mistaken, but I could not find a way to control the appearance and layout of the submit button in the webforms admin interface. Which was kind of surprising, because the webforms module is feature rich. I was expecting a way to designate an image for the button and perhaps basic position settings (left, center, right). Again, to be fair, Drupal module development is open source developed, so I could contribute instead of casting stones, no?
\n\n
Anyhow, a quick peek at the page source of a form created with Drupal webforms shows this HTML for the submit button:
\n\n
\n\n
Which is inside this form tag:
\n\n