2016-10-03 138 views
-1

的鏈接是相互覆蓋,截圖:enter image description here鏈接重疊海誓山盟發出

我使用的CSS是:

.moderation_buttons a:link, .moderation_buttons a:active, .moderation_buttons a:visited{ 
padding: 1px 9px; 
background: #d6d6d6; 
color: #000; 
margin: 3px; 
text-decoration: none;} 

在任何情況下,一個希望看到這些鏈接的HTML,這裏是HTML:

// Working on the Moderation Buttons 
$view_profile = '<a href="index.php?action=profile_student&amp;sid='.$sid.'">VIEW PROFILE</a>'; 
$edit = '<a href="index.php?action=edit_student&amp;sid='.$sid.'">EDIT</a>'; 
$delete = '<a href="index.php?action=delete_student&amp;sid='.$sid.'">DELETE</a>'; 
$cancel = '<a href="index.php?action=cancel_student&amp;sid='.$sid.'">CANCELATION</a>'; 
$admission_form = '<a href="index.php?action=cancel_student&amp;sid='.$sid.'">ADMISSION FORM</a>'; 
$promote = '<a href="index.php?action=promote_student&amp;sid='.$sid.'">PROMOTE</a>'; 
$fee = '<a href="index.php?action=fee_print_student&amp;sid='.$sid.'">FEEs</a>'; 

$moderation_buttons = '<div class="moderation_buttons">'.$view_profile.$edit.$delete.$cancel.$admission_form.$promote.$fee.'</div>'; 

我該如何調整它,使鏈接正確調整,並且不會相互覆蓋?

感謝

+0

我認爲你的意思是「重疊」。 –

+0

是的你是對的,我的意思是重疊 –

回答

1

.moderation_buttons a{ display: inline-block } 

錨標籤不塊元素,這就是爲什麼補白不被添加到錨標記。爲了做到這一點,你應該使它成爲塊級元素。但既然你想要它在內聯也使用display: inline-block風格。

+0

謝謝Kiran,它的工作。 +1爲你 –

+1

歡迎你Imran。祝你有美好的一天。 –