Issues detected with Foundation Block Grid in small size setting

I created a React component to display a series of div elements on a page using the Foundation Block Grid system to control the number of divs per row. However, I am facing an issue where the number of divs does not change when switching to a small-sized screen, even though it changes from 6 to 4 when switching from large to medium screens.

Can anyone advise why the 'small-up-1' class is not taking effect on a small screen?

Thank you.

const MovieList = ({movies}) => {
  if (movies.length === 0) {
    return <p>We Could Not Find Anything</p>;
  }
  movies = movies.map((movie) => {
    let className = "column column-block movie-box";
    let image;
    if (movie.poster_path) {
      image = <img src={`http://image.tmdb.org/t/p/w185/${movie.poster_path}`} />;
    } else {
      image = <img src={`http://www.planetvlog.com/wp-content/themes/betube/assets/images/watchmovies.png`} />;
    }

    return(
      <div key={movie.id} className={className}>
        <p>{movie.title}</p>
        {image}
      </div>
    );
  });
  return (
    <div className='row small-up-1 medium-up-4 large-up-6'>
      {movies}
    </div>
  );
};

Answer №1

Combining row and column classes in the same div is not allowed. Additionally, please remember to use class instead of className.

<div class='row'>
    <div class='small-up-1 medium-up-4 large-up-6'>
        {movies}
    </div>
</div>

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

Transform an SVG string into an image source

Is there a way to convert an incoming string ' ' into an img src attribute and then pass it as a prop to a child component? I attempted the following method, but it hasn't been successful. `let blob = new Blob([data.payload], {type: &apos ...

Using JavaScript functions on HTML data loaded by the jQuery.append() method: A guide

Utilizing JSON data, I have successfully generated HTML content representing Questions and Multiple Choice Questions. My next goal is to capture user responses in an array after the submit button is clicked. This involves storing which radio button the use ...

What is the best way to incorporate font-awesome icons into a Rails view?

I'm struggling to incorporate font-awesome icons in my Rails view. I had a static standalone HTML code snippet that I added into the Rails view: <span class="icon-white"> <a href="https://twitter.com/xyz"> <i class="icon icon-tw ...

Drifting my dropdown menu bar through the digital sea

I'm having trouble with my navigation bar and I need help styling it. I want the navigation bar to have a dropdown menu when the user hovers over the top level of the navigation bar. The issue I am facing is that the second level of the navigation bar ...

How to insert text into a text input using onKeyPress in react.js

I am looking to simulate a typing effect where the phrase 'Surveillance Capitalism' is inputted letter by letter into a text input field as a user types. However, I encounter an issue when trying to add each individual letter into the input; I re ...

Why does styled-components inject global styles after component styles by default?

Take a look at this react-app example using styled-components: import styled from "styled-components"; import { createGlobalStyle } from "styled-components"; import React from "react"; const GlobalStyle = createGlobalStyle` ...

Can you explain the significance of the ColSpan property in the Material UI TablePagination?

Why is ColSpan used in this code snippet? Reference: https://material-ui.com/components/tables/#table Check for the arrow symbol <TableFooter> <TableRow> <TablePagination rowsPerPageOptions={[5, ...

Move to the right with floating using Angular Material

I am dealing with a situation in which I have an md-card-content element. Inside it, there is a div and another md-card-content element. The challenge I am facing is that I want to move the contents of the inner md-card-content to the right. I tried usin ...

404 (Not Found) - I cannot comprehend the message at POST http://localhost:3000/api/contactus

Just diving into the world of web development, I'm currently in the process of creating a contact form that should send the form contents to an email upon submission. To guide me through this process, I followed a tutorial on YouTube: https://www.yout ...

Having trouble getting two components to return in React

After successfully implementing the Hello World example by returning "Hello" and "world" from two different components, I encountered a problem with my code. In this specific code snippet, I am unable to return the Menubar component, although the Map compo ...

Place a Three.js scene within a jQuery modal dialogue box

I am attempting to integrate a Three.js scene into a jQuery modal window. The objective is to utilize the Three.js scene in a larger window size. This scene should be displayed after clicking on an image that represents the scene in a smaller dimension. Y ...

Utilize CSS to prioritize the image and ensure it is responsive

I'm utilizing the 'featurette' feature in bootstrap. Currently, the page displays text on the left and an image on the right. As you reduce the browser size, they stack on top of each other, with the text appearing above the image. How can I ...

Ways to display information using a show/close button in React

I am currently immersed in the learning process of React. My goal is to display information about different countries using a toggleable button. However, I have encountered some obstacles along the way. There's an input field that triggers upon enteri ...

Increasing space at the top with heading

As I scroll down, the header on my website remains in a static position and disappears. However, when I scroll back up, the header reappears wherever the user is on the page. While this functionality works well, I have noticed that as I scroll all the way ...

Resetting Material-UI slider to its default minimum and maximum values

I have implemented a unique double sided slider component using @material-ui/core/Slider based on the guidance provided in their documentation for customized sliders Upon initial rendering, the slider appears like this: As I interact with the slider, the ...

Looking to properly line up and design an MUI icon button alongside a text input

After creating a modal dialog with increment and decrement buttons for text-input values, I realized it needs alignment and some styling. While the functionality is there, the appearance is lacking according to the image provided. https://i.stack.imgur.co ...

What is the rationale behind placing the CSS outside of the React function components, near the imports?

Recently, I encountered an issue with loading CSS inside a React function component using Material UI. Even though I managed to resolve it, I am still intrigued by the underlying reason. Initially, I had something like this setup where I placed both makeSt ...

Encountered a problem while trying to add npm package to a Next.JS project

Looking for some assistance with installing an npm package called react-mic. My aim is to enable user audio recording and display the wavelength pattern. I've encountered an error, and you can see my logs and package.json in the provided image. Any he ...

Guide to adding a Scrollable Navbar

Is the term "scroll bar" really accurate? I want to create a scrollable feature where users can easily select a city using their mouse wheel (or swipe on a smartphone) and then choose from possible cities within that country in a second window. Something s ...

Ways to align my image to the left and text to the right using Bootstrap

body{ height: 100%; font-size: 1rem ; } .navbar-brand{ font-family: 'Syne Mono', monospace; color: black; size: 0.5rem; } header { width: 100%; height: 100vh; background: rgb(237,104,104); background: linear-gradient(90d ...