Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

{text-indent : -9999} for image replace not working

Tags:

html

css

Any ideas why?

http://jsfiddle.net/FHUb2/

.dashboard-edit,
.dashboard-delete {
  height: 30px;
  width: 50px;
  background: url("https://i.stack.imgur.com/kRZeB.png") no-repeat top left;
  text-indent: -9999px;
}
<a href="#" title="Edit" class="dashboard-edit">Edit</a>
<a href="#" title="Delete" class="dashboard-delete">Delete</a>
like image 657
ilyo Avatar asked Oct 11 '11 08:10

ilyo


1 Answers

Apart from the reason that text-indent doesn't works on inline elements. another reason is if your element or one of its parent has been set with text-align:right

So make sure your element has been set with text-align:left to fix this.

like image 181
asumaran Avatar answered Sep 19 '22 22:09

asumaran