View Full Version : can i apply style to the button of the input type=file
frontline
09-17-2002, 01:08 PM
hello
can i apply simple style to the button part of the input type=file?
like changing the font style and color?
requestcode
09-17-2002, 01:23 PM
You mean something like this:
<html>
<head>
<title>Form Styles</title>
</head>
<body>
<form>
<input type="file" style="background-color:yellow;color:blue;font-face:Arial">
</form>
</body>
</html>
frontline
09-17-2002, 01:58 PM
tnx for the fast reply but i mean to the font and color of the button not the filed
adios
09-17-2002, 06:45 PM
<html>
<head>
<title>untitled</title>
</head>
<body>
<form>
<input id="realfile" type="file" style="position:absolute;visibility:hidden;"
onchange="document.getElementById('dummyfile').value=this.value">
<input id="dummyfile" type="text"
style="font:200 11px 'comic sans ms';color:ivory;border:4px coral inset;background:darkorange;">
<input type="button" value="get da' file"
style="font:200 10px 'comic sans ms';color:ivory;border:3px coral outset;background:darkorange;padding:1px;"
onclick="document.getElementById('realfile').click()"
onmousedown="this.style.borderStyle='inset'"
onmouseup="this.style.borderStyle='outset'"
onmouseout="this.style.borderStyle='outset'">
</body>
</html>
frontline
09-18-2002, 07:29 AM
hi
well this is exactly what i was looking for ..
but not so colorful ...(:
can you please give me the style parames to mimic the exact html button color (the border and stuff ..)?
this will help me allot !! i really need it to be the same as the html <input type=file> but only the button font and font color
will be different (font:bold 8pt Tahoma;color:black)
thanks allot!
martin_narg
09-18-2002, 07:48 AM
http://www.devguru.com/Technologies/html/quickref/color_chart.html
hope this helps
m_n
adios
09-18-2002, 07:01 PM
<html>
<head>
<title>untitled</title>
</head>
<body>
<form>
<input id="realfile" type="file" style="position:absolute;visibility:hidden;"
onchange="document.getElementById('dummyfile').value=this.value">
<input id="dummyfile" type="text"
style="font:bold 8pt Tahoma;color:black;">
<input type="button" value="get da' file"
style="font:bold 8pt Tahoma;color:black;"
onclick="document.getElementById('realfile').click()">
</body>
</html>
Deja Vu
07-08-2006, 05:41 PM
You ADIOS are the best of the best :thumbsup:
I own you one!!
You may find it will only work in IE
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.