Css grid vh issues

so i set my grids view height to vh but i am able to scroll downward on the page is there a fix for this to prevent it from scrolling?

So you don’t want the page to scroll vertically if I shorten my browser window and all the content doesn’t fit on the page?

i havent worked on the responsive part yet and yeah trying to get it to not scroll vertically do i need to reduce the size of the elements?

Personally, I would not recommend this approach. I suppose you could reduce the size of the graphics and elements but then they wouldn’t be readable. There is nothing wrong with vertical scroll. Is there a specific reason you are trying to prevent this?

uh well i was given the task to recreate this twitch ui by a mentor of mine and when i showed him the link he asked “why am i able to scroll?” which would most likely mean that it shouldnt be scrollable? he said to use max width and height but ive tried those and nothing changed so im not sure.

Usually you try to prevent horizontal scroll (which a responsive design will take care of). Are you sure he didn’t just mean horizontal? I suppose there might be instances where a case could be made for preventing vertical scroll, but I don’t think this page is it. As you narrow the browser you will need to stack your elements on top of each other in a column and the height of the page is going to grow (unless you are going to just remove elements at narrower widths). So unless you are prepared to make those elements very small you are going to have vertical scroll.

I don’t know all of the specifics here so I am hesitant to criticize, but I would be very curious if someone told me to put max heights on things in order to prevent vertical scrolling. I’d at least want to get clarification on why they want to do that and make sure they understood that doing so is going to make it very hard for some people to read the page.

1 Like

thank you! i clearify with him so i get a better understanding.