# freeCodeCamp Challenge Guide: Create Flexible Layouts Using auto-fill

**URL:** <https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-create-flexible-layouts-using-auto-fill/301126>\
**Category:** freeCodeCamp Contributors\
**Tags:** guide\
**Created:** [August 3, 2019, 5:39am UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-create-flexible-layouts-using-auto-fill/301126 "2019-08-03T05:39:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![camperbot](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/camperbot/32/18364_2.png) [@camperbot](https://forum.freecodecamp.org/u/camperbot)\
**Post date:** [August 3, 2019, 5:39am UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-create-flexible-layouts-using-auto-fill/301126/1 "2019-08-03T05:39:56Z")

</div>

# [Create Flexible Layouts Using auto-fill](https://www.freecodecamp.org/learn/responsive-web-design/css-grid/create-flexible-layouts-using-auto-fill)

* * *

## Problem Explanation

This challenge will expound upon the previous challenge by adding the **auto-fill** value to the _repeat_ function. This will cause the number of divs to expand based on the viewport’s size rather than the previously specified column value. In the **Before** section below, the **grid-template-column** value “3” is specified.

_Keep in mind that the following code snippets are only examples and not the exact challege from freeCodeCamp’s curriculum._

**Before**

```css
grid-template-columns: repeat(3, minmax(50px, 2fr));

```

**After**

```css
grid-template-columns: repeat(auto-fill, minmax(50px, 2fr));

```

#### Relevant Links

You may refer to the **Syntax** portion of the following page to see the **auto-fill** value:  
[Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/CSS/repeat)

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 8, 2025, 3:59pm UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-create-flexible-layouts-using-auto-fill/301126/2 "2025-01-08T15:59:17Z")

</div>

Closed on January 8, 2025, 3:59pm UTC


