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

Fixed header overlapping content #1517

Merged

Conversation

AlexNetcare
Copy link
Contributor

While trying to figure out Bootstrap, I found a Solution for the header overlapping the content when the header size changes. This might be a fix for #1514 unless I misinterpreted the Issue.
I was hoping to find a Bootstrap Solution but I either didn't find it or there is no other more elegant one.

@@ -61,5 +61,18 @@
</footer>
#end

<script>
function adjustPadding() {
var navHeight = document.querySelector('nav').offsetHeight;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be sure I suggest you check whether document.querySelector('nav') gives a result before trying to use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a simple check. If a nav Element does not exist then there won't be an exception in the Console now.

@fhoeben fhoeben merged commit f2ad293 into unclebob:master Jul 7, 2024
1 check passed
@AlexNetcare AlexNetcare deleted the bugfix/header-overlapping-content branch July 8, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants