Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
How can I theme the browse button?
I would like to have it equal to the upload button I've themed in CSS.
CSS changes done in the ".filefield-element input.form-file" class just has reflex in the text box.
As that text box (not editable) has the same behavior like the browser button, the deletion of the button would be a nice solution as well.
But I'm just able to remove the whole class (text box and button). Both or nothing.
Is there any way?
thanks
Comments
Comment #1
quicksketchIt's generally not possible to theme File elements in HTML. See http://www.quirksmode.org/dom/inputfile.html for a bit of a tutorial, though expect to get your hands dirty with JavaScript in order to accomplish the styling.
Comment #2
quicksketchComment #3
svnindia CreditAttribution: svnindia commentedSorry to reopen this issue regarding localization...
In one of my project the client uses the Chinese Windows OS the drupal UI for file browse button renders in Chinese, But it should render in English because the drupal language settings has English.
Any suggestions for making the "browse" button to render in English ?
Thanks in advance,
SVN
Comment #4
quicksketchWe don't have any control over the file elements, including the word "Browse" (in fact not all browsers even use the same word). The language of the button inherits from the language setting of the browser itself. At least if the user is using the entire browser in another language, it's likely they'll be able to read the language of the "Browse" button in that language also.
Comment #5
svnindia CreditAttribution: svnindia commentedI thought of having a fake browse button using Javascript/jquery with localization and making the original filed as hidden. But in IE i am facing security issue error....
Comment #6
quicksketch