2013-05-19 7 views
1
@Ajax.ActionLink("&nbsp","Delete", "FinancialIntermediary", 
       new { id = item.FinancialIntermediaryID }, 
       new AjaxOptions { HttpMethod = "GET", 
            OnSuccess = "DeleteSuccessFI", 
            Confirm = "are you sure to perform the deletion." }, 
       new { @class="classname" }) 

CSS 파일은 내가 삭제에 대한 배경 이미지를 설정하는 코드 위에 사용작업 링크에서 텍스트를 방지하는 방법

.classname 
{ 
    background-image:url('../../Images/delete.png'); 
} 

입니다. 나는 text.It을 피할 수없는이 같은 일을함으로써

난 그냥 공간을 사용하는 해당 place.Please 도움말에 이미지

답변

2

대신  를 사용하여 원하는이 enter image description here

같이 제공 :

@Ajax.ActionLink(" ","Delete", "FinancialIntermediary", new { id = item.FinancialIntermediaryID }, new AjaxOptions { HttpMethod = "GET", OnSuccess = "DeleteSuccessFI", Confirm = "are you sure to perform the deletion." },new { @class="classname" }) 

배경 이미지를 표시 할 수 있도록 당신은 또한 당신의 요소에 대한 일부 공간을 만들 필요가 것 :

.classname 
     { 
      background-image:url('../../Images/delete.png'); 
      display: inline-block; 
      width: 20px; /* adjust as necessary */ 
      height: 10px;/* adjust as necessary */ 
     } 
+0

@ Kenneth-not working .. 편집 링크와 함께 공백이오고 있습니다. – Niths

+0

그 이유는 요소가 이제 약간이기 때문입니다. 내 대답을 편집하여 CSS를 추가했습니다 – Kenneth

+0

여백이 여전히 있습니다 – Niths