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

jason limmm
jason limmm
7,791 Points

need help with css grid

i am making a calculator and i want my zero to be centered like this:

123
456
789
 0

but now my zero is aligned to the left like this:

123
456
789
0

i am using a css grid

.grid-container{
    display:grid;
    grid-template-columns: repeat(3, 32px);
    grid-template-rows: repeat(3, 32px);
}

1 Answer

Rohald van Merode
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Rohald van Merode
Treehouse Staff

Hi jason limmm 👋

You could try position the item by grid line to have that 0 element start at the second grid line instead of the default 1st grid line.

Hope this helps!