When creating a brand new Asp.Net MVC application with bootstrap 4.3.1 the default landing page contains a vertical scrollbar - which is silly, since the content nicely wraps and the footer is always visible?
Asked
Active
Viewed 310 times
1
-
I think I have found a solution, tweaking the default site.css as follow: html { position: relative; /*min-height: 100%;*/ min-height: calc(100% - 1px); } – DataWrangler1980 Sep 06 '19 at 08:02
-
1Possible duplicate of [Hiding the scroll bar on an HTML page](https://stackoverflow.com/questions/3296644/hiding-the-scroll-bar-on-an-html-page) – Mark Redman Sep 06 '19 at 08:02
2 Answers
0
This is probably a css issue?
What have you tried, you should try and show things you've tried so we are not repeating this.
Have you tried setting overflow:hidden
<style type="text/css">
body {
overflow: hidden;
}
</style>

Mark Redman
- 24,079
- 20
- 92
- 147
-
Thank you for your suggestions, do you think my tweak in site.css to set the min-height to calc(100%-1px) is not a good option? – DataWrangler1980 Sep 06 '19 at 08:04
-
-
overflow: hidden does not work - since it completely removes the scrollbar - even when there are more content that needs to be scrolled to.. – DataWrangler1980 Sep 06 '19 at 08:40
-
-
Yes, I tried using your advice to enhance the bpdy {} tag - to include overflow: hidden; however this removed the scrollbar always - even when it needs to be show. – DataWrangler1980 Sep 06 '19 at 11:31
0
I think this is a solution (it took care of my unnecessary vertical scrollbar ...)
Tweaking the site.css file 1. changed the min-height: 100% to instead do a calc(100% - 1px)...
html {
position: relative;
/*min-height: 100%;*/
min-height: calc(100% - 1px);
}

DataWrangler1980
- 183
- 3
- 13