How do I vertically align something inside a span tag?

后端 未结 9 1111
情话喂你
情话喂你 2020-11-28 18:52

How do I get the \"x\" to be vertically-aligned in the middle of the span?

.foo {
    height: 50px;
    border: solid black 1px;
    display: inline-block;
          


        
9条回答
  •  难免孤独
    2020-11-28 19:45

    Set padding-top to be an appropriate value to push the x down, then subtract the value you have for padding-top from the height.

提交回复
热议问题