Input type="file"

I am using input type=“file”, on click of out side of the input area it is opening the window, only on click of button open window should appear.

<div class="form-group has-success col-lg-6 col-sm-6">
	<div class="input-group">
		<label class="control-label label-text mb5" for="education">Upload Image</label>
		<input class="form-control" readonly="" disabled="" name="uploadimage" id="uploadimage" required="" type="text">
		<span class="input-group-btn">
		<span class="btn btn-success btn-file ml5" style="top:16px;">
		Browse<input type="file">
		</span>
	</span>
		</div>
		   </div>
css:
.btn-file input[type=file] {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 100%;
  min-height: 100%;
  font-size: 100px;
  text-align: right;
  filter: alpha(opacity=0);
  opacity: 0;
  background: red;
  cursor: inherit;
  display: block;
}

I assume you have a script that goes with that also but I’m guessing you need this:

.btn-file{position:relative;max-width:75px;overflow:hidden;}
.btn-file input[type=file] {
	position: absolute;
	top: 0;
	bottom:0;
	right: 0;
	left:0;
	min-width: 100%;
	min-height: 100%;
	font-size: 100px;
	text-align: right;
	filter: alpha(opacity=0);
	opacity: 0;
	background: red;
	cursor: inherit;
	display: block;
}

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.