How to make a div with no content have a width?

前端 未结 11 1785
余生分开走
余生分开走 2020-12-12 20:13

I am trying to add a width to a div, but I seem to be running into a problem because it has no content.

Here is the CSS and HTML I have so far, but it is

11条回答
  •  一生所求
    2020-12-12 20:37

    It has width but no content or height. Add a height attribute to the class test1.

提交回复
热议问题