Making a div the same size as an image inside it

前端 未结 7 2286
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-13 12:21

I have an div with the following code

HTML:

7条回答
  •  臣服心动
    2021-02-13 12:37

    Just try to do like this:

    div#imgContainer {
        width: Auto;
        height: Auto;
        padding: 13px;
    }
    

提交回复
热议问题