首页 > 解决方案 > Bootstrap fixed navbar is wider then html and causes x-overflow

问题描述

On my website https://bennetdev.de I have a fixed-top navbar which seems to be wider then my actual html tag. I think it is a problem between the navbar and my bootstrap modal but I don't know how to solve it. Due to the wider navbar a white space on the right side is shown when you visit the page, but disappears when opening the modal (through the contact button) and is not existent anymore until you refresh the page. Anyone knows how to fix this?

EDIT: There is no overflow because I hide the x-overflow on my body element but what I mean is the white bar on the right side, which would be a x-overflow without me hiding it

White Bar

标签: htmlcsstwitter-bootstrapbootstrap-4

解决方案


您可以使用max-height: 210px;来定义导航栏的高度。

无论如何,我建议上传一些我们可以看到的代码。


推荐阅读