HTML/CSS Text overflowing its container

前端 未结 3 871
面向向阳花
面向向阳花 2021-01-15 18:14

I\'ve been doing this simple page with a text field and two select fields, where I can choose a text color and a text size. I put some borders with diferent colors to each d

3条回答
  •  盖世英雄少女心
    2021-01-15 18:29

    When you change a div's display property to inline, you lose the ability to control the height of that container because it is no longer a block element. Using inline-block will fix it.

    div
    {
      display:inline-block;
    }
    
    div.subject {
      border: thin solid #008000;
    
    }
    

    Cheers!

提交回复
热议问题