Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added back to top button to main page #121

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CSS/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -710,4 +710,27 @@ footer .copywrite{
.desktop-main-menu .nav-items{
display: none;
}
}

.backtotop {
--offset: 50px;
position:sticky;
bottom: 20px;
margin-left: 45%;
margin-right: 45%;
place-self: end;
margin-top: calc(100vh + var(--offset));

/* visual styling */
text-decoration: none;
font-size: 25px;
padding: 4px 12px 4px 12px;
color: #fff;
background: rgba(0, 0, 0, 0.5);
border-radius: 20px;
white-space: nowrap;
}

.backtotop:hover{
background: rgba(0, 0, 0, );
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ <h2>Subscribe to Our Newsletter</h2>
</ul>
<p class="copywrite"><b>ISRO &copy; 2023</b></p>
</footer>

<a href="#" class="backtotop">Back to Top &#8593;</a>
<script src="./JS/copyrightYear.js"></script>
</body>

Expand Down