user2081191
user2081191

Reputation: 15

Make button look like text

I'm very new to coding in html. I'm trying to understand why this won't work on my site. I've made this button copy text when it is clicked, but I want the button to look like text. I found the attributes that should be changed, but am unsure how to apply them. My current code:

<button id="clip_copy" data-clipboard-text="copied text, yay">Copy Clipboard</button>

<style>
.clip_copy
 {
    background:none;
    border:none;
    margin:0;
    padding:0;
}
</style>
<script src="zeroclipboard/ZeroClipboard.js"></script>
<script>
  var clip = new ZeroClipboard( 
    document.getElementById('clip_copy'), {
    moviePath: "zeroclipboard/ZeroClipboard.swf"
    });
</script>

Upvotes: 0

Views: 993

Answers (1)

Stepan Grigoryan
Stepan Grigoryan

Reputation: 3162

In your css, change .clip_copy to #clip_copy. The syntax you are using is for classes.

Upvotes: 2

Related Questions