Help with CSS & HTML code
Hello,
I'm currently experimenting my CSS and HTML skills with a school assignment. Currently I'm making an extension for the chrome store for students at my school. I need to have a CSS button that leads to a link that goes to a webpage. The HTML code <button class="button button">Shadow Button</button>is being pulled from a CSS StyleSheet that looks like this: http://pastebin.com/JaFh96AF.
Can anyone help me on putting a href into the html part of the code so when someone clicks the button it will go to a webpage?
Thanks
I'm not too sure in what you mean, but I think this is what you want
this will make elements enclosed in the <a> tag linkable to the link you've put in the href.
Luna told me to post this real fast.
<a href="link2site" class="btn">This is a button</a>
ByNookyavaat 13th of January 2017 00:50:04
Luna told me to post this real fast.<a href="link2site" class="btn">This is a button</a>
That only works if the class btn actually creates a button. If you want to, you can use the one previously stated above with the <a> tags, OR you can use
<button onclick="window.location.href='https://google.com'">This is a Button</button>
I got this to work:
I had to put target="new" because it wouldn't do anything without it. Thanks for the help!