Side-by-side list items as icons within a div (css)

前端 未结 7 1788
臣服心动
臣服心动 2020-12-30 00:48

I am looking for a way to create a

    of items that I can put within a
    and have them show up side-by-side and wrap to the next
7条回答
  •  青春惊慌失措
    2020-12-30 01:27

    I used a combination of the above to achieve a working result; Change float to Left and display Block the li itself HTML:

    1. bar1
    2. bar2

    CSS:

    .foo li {
        display: block;
        float: left;
        width: 100px;
        height: 100px;
        border: 1px solid black;
        margin: 2px;
    }
    

提交回复
热议问题