How to limit the number of items in a Webflow collection on responsive?

Tutorial
3 min
Published on Mar 20, 2023
Updated on
Limit Item Webflow Responsive
Use AI to summarize this article
Key points

In today's Webflow tutorial, we will explore how to restrict the number of items on Tablet or mobile devices, or according to a specific screen size.

Use Case Example for Your Webflow Site

Imagine you have a collection on desktop with a limit of 5 items, and your collection list is displayed in a grid format with 5 columns.

This layout may work perfectly on Desktop, but from the tablet version onwards, your items could become too cramped in this grid.

You might consider switching from columns to rows or using another type of display.

The Different Types of Element Displays in Webflow

However, this change can impact your design, and you may conclude that 3 items for the tablet version would be an ideal limit.

Tutorial in Webflow

Step 1: Insert a Collection

The first step, if not already done, is to add a collection at the desired location on your page. You can then customize it as you see fit.

Adding a collection to a Webflow project

Step 2: Add an Item Limit

After inserting and customizing your collection, you will need to set an item limit for the collection. To do this, you should:

  • Select your element "Collection List Wrapper" or "Collection List" or "Collection Item"
  • Navigate to the settings of the element
  • Click on "Limit items" in the "Display Limits" section
  • Set a limit in Show (in our example above, our limit would be 5)
adding a limit of 5 items to a Webflow collection

Step 3: Assign a Class to the Collection List Element

Once you have added an item limit, you can assign a class to your "Collection List" element (if not already done). For example, we could name it "blogpost_collection-list".

adding a class to the Webflow collection list

Step 4: Add CSS Code

Once your collection list is renamed, you can insert the following code into your project. If you want your project to be fully optimized, it's recommended to place the CSS code within the Head tags of your page (inside <!-- fs-richtext-ignore --><head> tag). You will then need to publish the project to see the changes.

You can also add an embed element to your page and paste the code inside it to view the modifications directly in the Designer.

<style>
@media (max-width: 991px) {
  .blogpost_list.w-dyn-items :nth-child(n+4) {
    display: none;
  }
}
</style>

Of course, you can modify this code to fit your needs:

  • You can change the min-width to apply adjustments to larger or smaller screen sizes.
  • You can modify .blogpost_collection-list to match the name of your item list class.
  • You can replace the 4 in "n+4" with another number to hide more or fewer items.
adding code to hide items from the collection below 991px

This snippet of code allows you to vary the number of items displayed based on a specific screen size and helps prevent design issues on certain devices.

Collection with 5 items on desktop view (1500px)
Collection with 5 items on desktop view (1500px)
Collection with 3 items on tablet view (800px)

If this tutorial has helped you, you can discover more helpful tips for developing in Webflow.

Thibaut Legrand
Thibaut Legrand
Technical Solutions Architect & Webflow Expert

Suggested articles

Main entrance of VivaTech 2026 in Paris featuring the official 10th-anniversary event branding, Europe’s largest technology and innovation conference.
Events

Digidop at VivaTech: Two Days at the Heart of European Tech

Digidop at VivaTech: Two Days at the Heart of European Tech
Wide view of the 2036 by Yuri & Neil stage, bringing together more than 400 marketing leaders to discuss the future of the CMO role in the age of artificial intelligence.
Events
AI

Looking Back at Our Participation in 2036, Yuri & Neil’s Marketing Event for CMOs

Looking Back at Our Participation in 2036, Yuri & Neil’s Marketing Event for CMOs
Participants networking during flowConf 2026 in Belgrade, a European conference focused on the future of web, Webflow, and AI, inside a modern industrial venue featuring “Future of Web Unpacked” banners.
Events

The 2026 edition of flowConf perfectly reflects the turning point of the European Web(flow) ecosystem.

The 2026 edition of flowConf perfectly reflects the turning point of the European Web(flow) ecosystem.

Want to turn your website into your most valuable asset?

Contact us today