I am currently using image mapping to display emoticons. For example, when I type ':)', it is automatically converted into a gif smiley image. However, the issue I am facing is that the emoticon appears slightly higher than the text. How can I ensure that the emoticon image and text align on the same line? I have tried adjusting the margin-top and padding-top, but it has not resolved the issue. Below is the HTML code of the message sent by User:
<div class="message"><span class="userName">
User
</span>
: hello
<img class="emoticonimg" src="emoticons/face-smile.png"></img>
</div>
This is the JQuery code used to convert :) to an emoticon image:
html = html.replace(emotes[emoticon][i], "<img src=\"" + icon_folder + "/face-" + emoticon + ".png\" class=\"emoticonimg\"/>", "g");