diff --git a/main.css b/main.css index 73239d9..c1b3e27 100644 --- a/main.css +++ b/main.css @@ -1,19 +1,8 @@ -#topbutton { - display: none; /* Hidden by default */ - position: fixed; /* Fixed/sticky position */ - bottom: 20px; /* Place the button at the bottom of the page */ - right: 30px; /* Place the button 30px from the right */ - z-index: 99; /* Make sure it does not overlap */ - border: none; /* Remove borders */ - outline: none; /* Remove outline */ - background-color: red; /* Set a background color */ - color: white; /* Text color */ - cursor: pointer; /* Add a mouse pointer on hover */ - padding: 15px; /* Some padding */ - border-radius: 10px; /* Rounded corners */ - font-size: 18px; /* Increase font size */ -} - -#topbutton:hover { - background-color: #555; /* Add a dark-grey background on hover */ +#gototop_button { + display: none; + position: fixed; + bottom: 20px; + right: 30px; + z-index: 99; + cursor: pointer; } diff --git a/main.js b/main.js index e32b218..dbb5226 100644 --- a/main.js +++ b/main.js @@ -1,5 +1,5 @@ // Show button on scroll -window.onscroll = function() {toggle_gototop_button()}; +window.onscroll = function() { toggle_gototop_button() }; function toggle_gototop_button() { gototop_button = document.getElementById("gototop_button");