...

View Full Version : CSS on an input of type file



Exodious
09-26-2003, 11:11 AM
<style>
.uploadBtn
{
font-size: 15px;
font-family: arial;
border : thin groove;
}
</style>
<input type="file" name="filename" class="uploadBtn" size="30" id="file0" onclick="setId(this.id)">


Hiya, I am trying to change the background color of the button created using an input of type file... all I've managed so far is setting the background of the input, any ideas welcome...

Kor
09-26-2003, 02:57 PM
try using "styles on fly", I mean styels defined by a JavaScript function, DOM mainly, i think is a better choise :-)

document.getElemntById(id).style

method

Exodious
09-26-2003, 03:16 PM
tried setting using getEl and doc all but same affect. oh well, jsut made it look cuter by making the font size of the whole object smaller ;)

cheesebag
09-27-2003, 01:09 AM
http://www.codingforums.com/showthread.php?threadid=6315&highlight=file

glenngv
09-27-2003, 08:42 AM
Note that it would only work in IE.

liorean
09-27-2003, 11:02 AM
Well, in moz the following syntax is used in it's internal stylesheets:

input[type="file"]>input[type="text"]
input[type="file"]>input[type="button"]

I guess you could use that in the stylesheet, too. It's even entirely valid css, though a bit strange from the html/xhtml point of view.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum