Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

grid position items

hello I am looking for a way to get my letters behind the placed letters thought it was with grid-auto-flow but this does not work. it must be: le main square festival and emptying places in the grid where there is no letter.

* {
    box-sizing: inherit;
}

html {
    font-size: 62.5%;
    box-sizing: border-box;
}

body {
    background-image: url("/oefening3-square/assets/img/background.jpg");
    background-size: cover;
    display: flex;
    justify-content: center;
}

.words {
    display: grid;
    grid-template-columns: repeat(8, 13rem);
    grid-template-rows: repeat(4, 13rem);
    width: 96rem;
    margin: 6rem;
    height: 60rem;
}

.words__letter {
    background-color: beige;
    display: flex;
    font-size: 10rem;
    justify-content: center;
    text-transform: uppercase;
    border: 2rem orange solid;
}

.words__letter--line1 {
    grid-area: 1 / 4;
}

.words__letter--line2 {
    grid-area: 2 / 3;
}

.words__letter--line3 {
    grid-area: 3 / 2;
}

.words__letter--line4 {
    grid-area: 4 / 1;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/style.css">
    <title>Main Square festival</title>
</head>
<body>
    <div class="words">
            <p class="words__letter words__letter--line1">l</p>
            <p class="words__letter">e</p>
            <p class="words__letter words__letter--line2">m</p>
            <p class="words__letter">a</p>
            <p class="words__letter">i</p>
            <p class="words__letter">n</p>
            <p class="words__letter words__letter--line3">s</p>
            <p class="words__letter">q</p>
            <p class="words__letter">u</p>
            <p class="words__letter">a</p>
            <p class="words__letter">r</p>
            <p class="words__letter">e</p>
            <p class="words__letter words__letter--line4">f</p>
            <p class="words__letter">e</p>
            <p class="words__letter">s</p>
            <p class="words__letter">t</p>
            <p class="words__letter">i</p>
            <p class="words__letter">v</p>
            <p class="words__letter">a</p>
            <p class="words__letter">l</p>
    </div>
</body>
</html>

no I need de letters like space space space l e space space space next line space space m a i n space space next line space s q u a r e space next line f e s t i v a l bet Now the flow is wrong the first letters are on there place bet de rest is starting from the first emtie spot on de first row first column

1 Answer