Horizontally centering/evenly distributed
  • inside of
      inside a
  • 前端 未结 8 1747
    情书的邮戳
    情书的邮戳 2020-12-08 07:34

    Have a Navbar

    8条回答
    •  醉话见心
      2020-12-08 07:44

      The proper way to do this these days is to just use Flexbox:

      .navbar ul {
        list-style-type: none;
        padding: 0;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        flex-wrap: nowrap; /* assumes you only want one row */
      }
      

    提交回复
    热议问题