I have the following HTML markup:
<p><span>Hello</span> <div class="show" /></p>
Now the div
has the background-image
property set to some image:
.show {
background-image: url(http://doc.jsfiddle.net/_downloads/jsfiddle-logo.png);
background-size: contain;
width: 40px;
height: 40px;
display: inline-block;
}
I can't seem to get the div
(or, rather, the image) on the same line as the span
because of the p
around the both of them. Is this even possible while keeping the p
?
Here is a JSFiddle showcasing the problem