• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 450
  • Last Modified:

set width to the< Input type=file>

Hi,
I have button on top of <input type=fie>. I need to set the width to the input type=file as similar to button width. Is there anyway do it.
Code snippet:
  <input type="button" name="Done" value="Choose a Pic" class="button small primary"/>
                <input type="file" name="files" id="imageFile" class="buttonUpload button small primary">
Css is written to made the opacity:0 to imageFile.

Issue here is width is not getting equal between button and input file type?
0
gaurih
Asked:
gaurih
  • 3
  • 2
1 Solution
 
gaurihAuthor Commented:
I followed this example, but I am able to clcik even outside of the button, since the background is with opacity:0. I need to control that based on the image on the front.
0
 
gaurihAuthor Commented:
is there any way in css3 with jquery?
0
 
gaurihAuthor Commented:
Can any one please help to compare the size of the textfield in input type=file and width of the button?
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now