0

I wrote the following CSS in WordPress:

.post-source {
  color: #aaa;
  display: inline-block;
  position: relative;
  top: 2px;
  float: left;
}

And then I received a warning:

float can't be used with display:inline-block issue

Currently the code works with no issue. But I want to know is there anyway I can improve this code better to avoid potential issue.

Thank you!

Temani Afif
  • 245,468
  • 26
  • 309
  • 415
William
  • 3,724
  • 9
  • 43
  • 76
  • The message says that float will be ignored du to display set to inline. Use either of it – Vega Aug 26 '19 at 04:32
  • @Vega it's the opposite, when using float the inline-block will be useless because the computed value of display will be *forced* to block : https://stackoverflow.com/q/27511533/8620333 – Temani Afif Aug 26 '19 at 08:28
  • @TemaniAfif, oops, you are right :) – Vega Aug 26 '19 at 08:29

0 Answers0