Skip to content

Commit 8cd8394

Browse files
committed
bottom to top button completed in all screen
1 parent f56bcf2 commit 8cd8394

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

Official_Website/faq.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,15 @@ <h5 class="mb-0 collapse-heading">
157157
<button class="about-button1">
158158
<a href="./about.html"> About Us </a>
159159
</button>
160-
<div id="scrollToTopBtn" class="scrollToTopBtn_FAQ" onclick="scrollToTop() "><img src="scrollToTop.png"></div>
160+
<div id="scrollToTopBtn" onclick="scrollToTop()">
161+
<img src="scrollToTop.png" alt="Scroll to Top">
162+
</div>
163+
164+
<script>
165+
function scrollToTop() {
166+
window.scrollTo({ top: 0, behavior: 'smooth' });
167+
}
168+
</script>
161169
<script src="app.js"></script>
162170
<!-- jQuery and Bootstrap Bundle (includes Popper) -->
163171
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>

Official_Website/navstyle.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,4 +308,17 @@
308308
.five {
309309
background-color: rgb(163, 114, 8);
310310
}
311-
311+
#scrollToTopBtn {
312+
position: fixed;
313+
bottom: 45px;
314+
left: 20px;
315+
cursor: pointer;
316+
z-index: 1000;
317+
}
318+
319+
#scrollToTopBtn img {
320+
width: 50px;
321+
height: 50px;
322+
background: #5fabee;
323+
border-radius: 50%;
324+
}

0 commit comments

Comments
 (0)