So I Have a black and white picture as my background, and I'm making the contact page for my site. Everything is going smooth the only problem is I want to make a transparent button that has a white border around it like on http://yokedesign.com.au/contact/ any ideas?
Asked
Active
Viewed 155 times
-6
-
1http://jsfiddle.net/YDjJA/1/ – adaam Feb 02 '14 at 23:22
-
possible duplicate of [HTML CSS Invisible Button](http://stackoverflow.com/questions/13990629/html-css-invisible-button) – verybadalloc Feb 03 '14 at 00:21
3 Answers
1
You just need to make the background-color: transparent
of the button:
Fiddle: http://jsfiddle.net/TQ357/
Then, you could make the border transparent as well if you wanted it to be completely blended in with the background.

Anonymous
- 11,748
- 6
- 35
- 57
0
The particular example you cited is an anchor tag with a border added to it. It has been styled using inline css, which is not best-practice, but could easily be moved to an external css file. Most of the big browsers include developer tools either bundled or as a plugin. With these tools you can right-click and inspect an element on the page and see the html and styles applied.

Romski
- 1,912
- 1
- 12
- 27
0
Looks like your example uses an <a>
anchor with CSS styling and a JS handler. Here's some CSS:
a.contact-submit {
border: 1px solid #FFF;
padding: 5px 10px;
float: right;
color: #FFF;
}
And the anchor (let's say you're using jQuery):
<form id="form-name">
<a href="#" class="contact-submit"> SEND </a>
</form>
<script type="text/javascript">
$(document).ready(function() {
$('.contact-submit').click(function(e) {
e.preventDefault();
$('#form-name').submit();
});
});
</script>

sjagr
- 15,983
- 5
- 40
- 67
-
4@Pawel_W there is no reason why inline js is bad just for being inline. Its hard to maintain for larger projects, but using it inline simplfies it for the op which is the point of the answer to his question; so he can understand. – agconti Feb 02 '14 at 23:26
-
3@agconti Exactly my intention, but to satisfy the snobs, I've made an edit. – sjagr Feb 02 '14 at 23:27
-
-
@agconti Your `background: transparent;` edit was unnecessary since backgrounds are transparent by default on anchor tags. – sjagr Feb 02 '14 at 23:32
-
-