My site has many buttons, and I would like to add an image after every one. However, when I use ::after, the image gets added inside the button. How do I use CSS to add an image below the button (or at least outside it), without changing the HTML? (See the preview to see how the image appears and how I want it.)
.button {
background-color: lightblue;
cursor: pointer;
padding: 4px;
}
.spacy::after{
content: url(http://upload.wikimedia.org/wikipedia/commons/3/39/Cat_used_in_a_user_box_template.JPG);
}
<p>Here's my HTML:</p>
<span class="button spacy">Click</span>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
<p>
I want it to look like this without changing the HTML:
</p>
<span class="button">Click</span>
<br>
<img src="http://upload.wikimedia.org/wikipedia/commons/3/39/Cat_used_in_a_user_box_template.JPG">
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>