I'm using WordPress 4.1.2
I have this bit of php that displays the list of tags to the left of a small image:
<p align="right"><?php
the_tags( '  ', ' • ', '<a href="https://www.lawlessfrench.com/faq/lessons-by-level/"><img src="https://www.lawlessfrench.com/graphics/icon-files.png" alt="Lawless French Files" width="20" height="30" align="right" hspace="10" border="0"></a>' );
?></p>
I want to replace the img with a sprite:
<div id="icon-files" style="float:right; height:30px; width:20px margin:10px" alt="Lawless French Files"></div>
So this is the code I'm using:
<?php the_tags( '  ', ' • ', '<a href="https://www.lawlessfrench.com/faq/lessons-by-level/"><div id="icon-files" style="float:right; height:30px; width:20px margin:10px" alt="Lawless French Files"></div></a>' ); ?>
But it doesn't work - the image goes down to the next line instead of staying to the right of the tags.
Is there some trick to using div tags inside of php? You can see it in action at https://www.lawlessfrench.com