Reputation: 319
I need to set an HTML input type= "file" object's opacity in Chrome. In IE, it looks perfect as i have used filter as below :
style="position: absolute; filter: progid:DXImageTransform.Microsoft.Alpha(style=0, opacity=0);
Same need to do for Chrome. Can anyone suggest how i use opacity filter for chrome?
So i need to hide this "Choose File" from the screen. I chose width=70px so that it can be clickable at a larger part. This is the input type i am using :
<input type="file" name="AttachLink" style="position: absolute; filter: progid:DXImageTransform.Microsoft.Alpha(style=0, opacity=0); imgobject.style.opacity=0; width:70px; height:50px; cursor: hand; left:-26px;" title="Add File Attachment" onChange="getWeblink();" size="40" float="right">
Upvotes: 0
Views: 308
Reputation: 4199
Use Opacity
property of css. You have to use opacity:0
for your scenario. Opacity
property take value from 0 to 1
where filter:Alpha
takes value from 0 to 100
.
Upvotes: 2
Reputation: 15609
Like this:
opacity:0;
An alternative is
visibility:hidden;
if you want the width to stay there.
Upvotes: 1