I want to optimize my code. I think I am correct in saying that if I combine multiple images into one file then I can’t use the position attribute unless the images are part of a background image. But I am not sure how to set up my DIV. Do I need to set the width and height of the DIV? Do I need to do display: block or something like that?
Here’s the code that I have so far:
<ul>
<li><a class='disabled' ><img width='16' height='16' src='../../Content/Icons/home.png' />Home</a></li>
<li><a href='xx' title='xx'><img width='16' height='16' src='../../Content/Icons/xx.png' />xx</a></li>
<li><a href='yy' title='yy'><img width='16' height='16' src='../../Content/Icons/yy.png' />yy</a></li>
</ul>
if you have multiple images in one file, I’d recommend you to add some classes, as @pduersteler said.
Something like this…