Currently, I have implemented an anchor element that utilizes a CSS class to replace the text with an image. Despite its unusual nature, the end result is mostly satisfactory.
.toolLink a {
overflow:hidden;
}
.toolEdit
{
float:left;
background:url(/resources/images/edit.png) no-repeat;
width: 15px;
height: 15px;
}
This is how my anchor element appears:
<a href="#" class="toolEdit">edit</a>
When I remove the "float:left" statement, the word "edit" becomes visible and the image shrinks. Removing "float:left" is necessary for centering the content in a table column. However, it results in the content aligning to the left due to this property being removed. What would be the correct course of action in this scenario?