Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scroll bar is there but the page is not scrolling

Tags:

html

css

Currently I am working on a website for my girlfriend, and the problem I am having is that I have a scroll bar on the page, but even though the content is overflowing outside of the the page, it is not allowing me to scroll up and down the page. If it helps, I am using the Brackets IDE for this project.

 body {

      background-color: rgb(66, 197, 244);
      overflow-y: scroll;
      overflow-x: hidden;
}

This is the CSS code I have for my body tag. Is there something I am missing or something I need to add?

like image 624
cruuds3027 Avatar asked Sep 09 '25 11:09

cruuds3027


1 Answers

Welcome to the StackOverflow. No, You're doing fine. Maybe there isn't enough content to scroll.

body {
  background-color: rgb(66, 197, 244);
  overflow-y: scroll;
  overflow-x: hidden;
}
<div>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>
  <p>content</p>

</div>
like image 174
stackminu Avatar answered Sep 11 '25 01:09

stackminu