How to center mat-card in angular materials?

前端 未结 3 1410
野趣味
野趣味 2021-01-11 11:40

I have a login card that I designed using angular materials, whenever I run it on the page the content sticks to the left of the page.

I tried using flex

3条回答
  •  庸人自扰
    2021-01-11 12:40

    Fixed it by using Very simple Flex

    .main-div{
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    

    and wrapping everything with a class

    
    

提交回复
热议问题