Toniq Toniq - 1 year ago 91
HTML Question

Float div inside spans

I have this code in a fiddle

I would like to know if its possible to make

float inside text, like its following text?


Answer Source

use display:inline-block

.a {
  display: inline-block;
  vertical-align: middle;
  width: 100px;
  height: 40px;
  background: red;
<span>Pause and play icons will automatically be attached to every mp3 song in text. Like this for example: </span>
<div class="a"></div><span> ut laoreet hendrerit mi. Nam vestibulum viverra diam. Nullam eros ipsum, rutrum ut, ultricies sed, congue sed, est. Pellentesque porttitor. Donec dictum urna eu mi. Maecenas in lorem.</span>