Is the bottom of the page getting partially hidden when there are more than two rows of elements?

This is a movie review application. When the screen size is on PC and mobile devices, there seems to be an issue where the movie review gets cut off from the 3rd row onwards. This is visible in the provided image, where only the buttons are partially cut off. If more rows were added, the reviews would be completely hidden.

Attempted solutions like applying height: 100% and width: 100% to the HTML and body elements resulted in an additional vertical scrollbar appearing when displaying the movie listings.

Looking for guidance on how to resolve this issue.

Here's my HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://kit.fontawesome.com/2a0c07254d.js" crossorigin="anonymous"></script>

    <!-- Additional CSS and Font Links -->

    <title>Reviewer</title>
</head>
<body>
  <!-- Various HTML elements including forms, headers, and listing divs -->

  <script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js"></script>
  <script src="../node_modules/axios/dist/axios.min.js"></script>
  <script src="./js/functions.js"></script>
  <script src="./js/movies.js"></script>
  <script src="./js/main.js"></script>
</body>
</html>

This is my CSS:


<!-- Style rules for various HTML elements including notifications, headers, forms, buttons, and movie list section -->

JavaScript generating HTML for each movie review:


// Function for dynamically creating sections with movie data
function generateHTML(res) {
  const movie = res.data;

  for (let i = 0; i < movie.length; i++) {
    const sections = document.createElement('section');
    sections.innerHTML = `
    <div class='id'>${movie[i].id}</div>
    <ul>
     <li> Title: <p class='title'>${movie[i].title}</p> </li>
     <li> Runtime: <p class='runtime'>${movie[i].runtime}</p> minutes</li>
     <li> Rating: <p class='rating'>${movie[i].rating}</p>/10 </li>
     <li> Review: <p class='review'>${movie[i].review}</p> </li>
    </ul>
    <div class="delete-and-update-btn-div">
      <button class="delete-btn">Delete</button>
      <button class="update-btn">Update</button>
    </div>
    `;

    movieListDiv.appendChild(sections);
 }
}    

If you have any suggestions or solutions, please share. Thank you!

https://i.sstatic.net/qUNjj.png

Answer №1

After thorough analysis, I have concluded that by eliminating

overflow: hidden;

within

#movie-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-template-rows: 1fr;
  grid-auto-flow: row;
  column-gap: 1fr;
  row-gap: 1fr;
  margin-bottom: 5%;
  overflow: hidden;    <--- remove that
}

the problem at hand can be resolved effectively.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue with JQuery UI Tabs not displaying additional HTML pages in JavaScript

One issue I'm facing is that I added Tabs from JQuery UI on my website. The tab containing paragraphs loads fine, but the tabs linked to other HTML pages (which don't have tabs) won't load. Here is my .js file code and .html code: $(funct ...

Hey there, I'm looking to use different CSS fonts on Windows and Mac for the same page on a web application. Can someone please guide me on how to accomplish this?

In order to tailor the font based on the operating system, the following criteria should be followed: For Windows: "Segoe UI" For Mac: "SF Pro" Attempts have been made using the code provided below, but it seems to load before the DOM and lacks persisten ...

How can we dynamically reference past elements in an array without using indices like "i-1", "i-2", and so on?

function play_tune(melody) { let played_notes = []; let durations = []; let positions = []; let wait_time = 0; let time_passed = 0; console.log("Melody initiation.") for (let key in melody) { played_notes.push(melody[key].note); dur ...

What's the reason the element inside the <div> is not displayed when a value is selected in the dropdown box?

I am perplexed as to why the element inside the does not appear when a value is selected in the drop down box. However, it works perfectly fine in JSFiddle: JSFiddle Below is my HTML code and Jquery script that functions properly in my own system: <t ...

The fetch() POST request is met with an error message stating "415 Unsupported Media Type"

I keep encountering a 415 error when attempting to upload a PDF file using fetch(). The PDF file resides in the same directory as the js file, and the name is correct. async function uploadFile(filePath, extension, timestamp) { const url = "https ...

How to get the initial item from an API using JavaScript mapping

When mapping my arrays, I usually use the following code: moviesList.map(movie => <MovieCard movieID={movie} key={movie} However, there are instances where my API returns multiple results. Is there a way to modify my .map function to display only t ...

Unique WordPress Loop Design (Grid/Row)

Looking for a custom Wordpress post loop that will display posts in a specific format. The desired layout includes two posts in each "col" div, both contained within a "row" div: <div class="row cols2"> <div class="col left"> <a href="#"> ...

The error message in Next.js states: "Attempting to access properties of undefined (specifically trying to access 'indexOf')."

After successfully running the code below, I encounter an issue upon refreshing the page: TypeError: Cannot read properties of undefined (reading 'indexOf'). const [folders, setFolders] = useState([]); const [user] = useAuthState(auth); c ...

E/AndroidRuntime: CRITICAL ERROR: main --- java code in an android app

I've been working on a map application and I've run into some issues. Can anyone help me figure out what's wrong with my code? ERROR 10-25 01:37:41.296 28673-28673/com.onemap.activities E/AndroidRuntime: FATAL EXCEPTION: main 10-25 01:37:4 ...

Expand the column to occupy the remaining height of the row

I've been on the hunt for a solution to this issue, but I haven't had any luck finding one. Various flexbox properties like flex-grow: 1; and align-self: stretch; have been attempted, but none seem to achieve the desired outcome. The goal is to ...

Looking for some CSS to style the image below

Looking for CSS assistance to style the sample image provided below. The letter within the circular element is contained in a div while the subscript Z is represented by an image of a circle. https://i.sstatic.net/sKF1H.png .text-center { text-align: ...

Implementing Jquery tabs into the code causes the vertical auto-scroll to smoothly glide beyond anchor points

I recently implemented a smooth autoscroll feature on my webpage using the CSS-Tricks code found here: http://css-tricks.com/snippets/jquery/smooth-scrolling/ Everything was working perfectly until I added jQuery tabs to display some of the content. Now, ...

"Picture positioned on the edge of the container, just on one

Using Bootstrap 4, I was able to create a container with a div positioned outside of the container on the right side. Now I am wondering if it is possible to achieve the same effect with a picture div. I managed to do so by using a pseudo-element :after an ...

Typescript is throwing an error when trying to use MUI-base componentType props within a custom component that is nested within another component

I need help customizing the InputUnstyled component from MUI-base. Everything works fine during runtime, but I am encountering a Typescript error when trying to access the maxLength attribute within componentProps for my custom input created with InputUnst ...

In React, the functionality of rendering components conditionally is not functioning properly

I am looking to conditionally display either the Login component or Menubar component based on the value of the isLogin state. If the isLogin state is false, I want to render the login page. If it is true, I want to render the Menubar page. To achieve thi ...

What can be done to prevent the angular material select from overflowing the screen?

I have integrated an Angular Material Select component into my application, which can be found here: https://material.angular.io/components/select/overview. The issue I am facing is that when the select element is positioned near the bottom of the screen a ...

Bootstrap container with added page border

Allow me to explain the issue to the best of my ability: I have a design that needs to be implemented using bootstrap. I prefer to use only CSS and avoid JS/jquery. The content is contained within a bootstrap container that has two columns. The left gre ...

Can the animation be looped using setInterval()?

Once the images finish sliding in the animation, they continue to slide right endlessly. I've attempted using a setTimeout function to move the images back left and restart the animation, but this causes the setInterval animation to stop. Is there a w ...

Picture not adapting correctly to various screen sizes

I'm looking to adjust the size of an image based on the user's browser window. Here is the code I have so far: .image { max-height: 15%; width: auto; } The image class is used in this section of my code: <ul> <li> <img c ...

Send the user back to the previous page once authentication is complete

I am integrating Google authentication through Passport in my web application and I am facing an issue with redirecting the user back to the original page they requested after a successful sign-in. It seems like the use of location.reload() might be causin ...