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
Cofounder at Vydera & Technical Solutions Architect

Suggested articles

Historical fund performance chart on an asset management company fund page
Documentation
Development

Fund Pages: How to Structure an Asset Management Company’s Fund Range on its Website

Fund Pages: How to Structure an Asset Management Company’s Fund Range on its Website
Promotional graphic for Webflow Conf 2026 featuring Lucas Clairet as a finalist for the Developer of the Year award. His black-and-white portrait is set against a vibrant abstract background with blue, orange, green, and pink textures, creating a bold, modern visual identity. The vertical Webflow Conf ’26 branding appears on the left, while his name and the title “Finalist – Developer of the Year” are displayed in a black panel.
News
Webflow

Lucas Clairet named Finalist for Webflow Awards 2026 – Developer of the Year

Lucas Clairet named Finalist for Webflow Awards 2026 – Developer of the Year
Overview of Webflow AEO combining AI recommendations, analytics, prompt tracking, and SEO optimizations within a single interface.
Documentation
Webflow

Webflow AEO: Answer Engine Optimization built directly into Webflow

Webflow AEO: Answer Engine Optimization built directly into Webflow
Every great website  
starts with a conversation
Abstract composition of black and gold metallic ribbons with elegant light reflections and smooth gradients. A premium background conveying luxury, modernity, and innovation.