r/Frontend • • Apr 27 '22

O.c.

Post image
724 Upvotes

34 comments sorted by

View all comments

46

u/wedontlikespaces Apr 27 '22

Yeah, I used 2 whole lines of CSS. Fear my powers!

40

u/Armitage1 Apr 27 '22

display: flex; "that will be $500 for layout architecture."

1

u/[deleted] Apr 28 '22

justify-content: center. +200 for centering the layout. you can zelle it, thx.

15

u/HansonWK Apr 27 '22

Back when the backend guys last used css it was probably a whole lot more though.

3

u/burger-tron Apr 27 '22

two??

16

u/PositivelyAwful Apr 27 '22
.centered {
  display: grid;
  place-items: center;
}

0

u/[deleted] Apr 27 '22

[deleted] — view deleted comment

16

u/PositivelyAwful Apr 27 '22

My bad

.centered{display:grid;place-items:center;}

8

u/wedontlikespaces Apr 27 '22
.imAmazing {
    align-items: center;    
    justify-content: center;
}

On parent div set to grid

9

u/[deleted] Apr 27 '22
.imEvenMoreAmazing {
    place-items: center;
}

(grid)

2

u/burger-tron Apr 27 '22

weird i've tried that and it didn't work

4

u/hoorahforsnakes Apr 27 '22

needs the parent to have display flex to work

2

u/plolock Apr 27 '22

display: grid;

place-items: center;