The primary image on the node edit form is super cool, but has some wierd alignment issues in certain themes (http://drupal.org/files/primary-image-alignment.jpg). Can the browse button be better aligned to work across different browsers?

Comments

kmonty’s picture

The most obvious solution would be to resize these element with percentages (say, maybe the input width: 65% w/ 5% right margin, and make the "Submit" button width: 30% max-width: 75px, or something like that)/

However, there no good way to resize input type=file forms without resorting to JS.

A few possible solutions:
1) We reduce the size attribute of the form to something less than 22 (13 worked sufficiently well in Bartik) and give the file input a margin-right of 10px, which would align it. Pluses: no JS hackery, easy. Minuses: doesn't look that awesome, not responsive, will still be broken on narrow themes/browser windows.

2) We could get rid of the upload button entirely, having the image auto-upload after the user selects it. IMO, this is ideal, as the two-step process is already confusing and ultimately needless. There's a decent starting point discussed here: http://drupal.stackexchange.com/questions/31121/how-can-i-automatically-...

3) We could use a JS library to allow us to style the forms, however this adds some glut to the module.

kmonty’s picture

Status: Active » Needs review
StatusFileSize
new2.57 KB

Here's a patch that removes the submit button and autouploads

populist’s picture

Status: Needs review » Fixed

Wonderful! Committed + Pushed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.