PDA

View Full Version : CSS Style File Input Field?



- |Flash Man| -
September 7th, 2008, 10:59 PM
Hey Guys,

Has anybody managed to style the file input field - i know their are some js methods out there and I have tried a few and with no luck I can't seem to get them all working?

Has anybody got a good solution for this?

Thanks in advanced!
George :)

Templarian
September 7th, 2008, 11:26 PM
Ehh... its not really "worth" it. There are ways to do it simply googling it will show you. I presume you saw all those examples and rejected them as cumbersome to the goal.

So in the end its usually "best" to use Flash, if you need it to fit into your sites design/layout, if not deal with it looking ugly or writing in one of the shown "work arounds"

ditt0
September 7th, 2008, 11:56 PM
What kind of input field? Text? It's pretty simple to style it, but it would help if you'd say how you'd want it to be.

- |Flash Man| -
September 8th, 2008, 12:34 AM
this is the field that I am wanting to use - <input type="file" name="upload">
(a normal text field is easy to customise).

And as with temps solution of using flash i'm more worried about people not having flash as (the target audience) isn't really up to date with keeping their systems to the latest.

There a few nice JS answers to this - it's just the JS which I can't quite get working yet. I'll keep at it - but just wondering if anyone has come across a simple solution yet?

Cheers,
:D

tfg
September 8th, 2008, 05:55 AM
there's not much you can do with a file upload field, except for putting a border around it and a few other tweaks. i don't think IE6 lets you do anything with it at all, the browse button will always look ugly. decent browsers will at least give you some kind of control over the browse button, but most of the time any changes will just affect the file path portion of the input.