Saroj Thapa Saroj Thapa - 1 year ago 72
HTML Question

Why does PHPStorm report that padding isn't allowed on a span element?

I have the following html code. The PHPStorm says attribute padding is not allowed here. How can I quickly fix this?

<span style="padding:10px 0;"></span>

Answer Source

Padding works on inline-block and block level elements

or rather use a stylesheet:

  display: inline-block;
  padding: 10px 0;
  background: navajowhite;
<span class="padded">I have a class!</span>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download