diff --git a/guide/english/css/css-buttons/index.md b/guide/english/css/css-buttons/index.md index 929714738a..a1853e77dd 100644 --- a/guide/english/css/css-buttons/index.md +++ b/guide/english/css/css-buttons/index.md @@ -145,6 +145,25 @@ To animate a button on click use 'button:active': } ``` +### Button Links + +In many cases buttons will have to link to an url. As we can't add an href attribute to the HTML button element without some JavaScript workarounds we need to style our link like a button. This way we have a working element disguised as a button, yet we can still use this class to style buttons. For example: + +``` +.btn { + display: inline-block; + text-decoration: none; + min-height: 40px; + padding: 20px 10px; + background-color: lightblue; +} + +// Prevent visited links from turning purple +.btn:visited { + color: black; +} +``` + #### More Information: * https://www.w3schools.com/css/css3_buttons.asp * https://www.w3schools.com/howto/howto_css_animate_buttons.asp