grid(6) - min content, max content

김동하·2020년 9월 9일
1

CSS

목록 보기
11/11
post-thumbnail

적당히를 모르는 text가 box를 넘어 존재하고 있다. 다른 box는 너무 겸손하다. 무척 혼내주고 싶다.


.grid {

display: grid;
grid-gap: 10px;
grid-template-columns: max-content 100px;
grid-auto-rows: 100px;
margin-bottom: 30px;

}

grid-template-columns: max-content 100px 첫 번째 column이 필요한 content만큼 width가 늘어났다. 이제 min-content 를 가는 것이다.

앙증맞은 크기가 되었다.

profile
프론트엔드 개발

0개의 댓글