Reputation: 1310
Im creating an app using jquery mobile and I have a feature that allows the user to click on an image which opens up
<input type="file" name="file" id="file" onchange="submitForm(this)" capture="camera" class="hideme" accept="image/*" />
This is working well, however, I need the input box to be hidden. I have written the following code:
.hideme
{
display:none;
visibility:hidden;
border: 0px;
}
but all this does is hide the text within the box, it doesn't actually hide the outline. Any ideas on how I can get rid of this? js fiddle here http://jsfiddle.net/DLC4Y/
Upvotes: 1
Views: 3029
Reputation: 679
Here's your solution:
Remove your previous styles related to hideme
class (i.e .hideme
) and add the following class.
.ui-body-c, .ui-overlay-c{
border: none;
box-shadow: none;
}
Have a nice day.
Upvotes: 0
Reputation: 20636
Use this,
$('#file').parent().hide();
jQuery mobile, appends a <div>
element to your <input>
field. The border comes from that div element and not your input. So you need to remove this <div>
OR
Add this to CSS.
.ui-input-text{
display:none;
}
Upvotes: 3
Reputation: 395
Make sure you're not overriding the CSS in another part of the file, also you should probably be using
border: none;
You could also possibly use the !important
on it to override any CSS that changes the property later on.
border: none !important;
Upvotes: 0
Reputation: 32310
display: none;
should be sufficient - it hides the element completely, including borders.
This is what I use, I have no visual or technical issues:
<style>
.hide-me { display: none; }
.i-am-a-link { cursor: pointer; }
</style>
<label for="image-upload" class="i-am-a-link">
<img src="placeholder.jpg"
id="image-upload-label">
</label>
<input type="file" id="image-upload" class="hide-me">
Upvotes: 1
Reputation: 3875
border: 0px;
this is what you are mentioning
where as it should be
border: none;
Upvotes: 0