2016-10-03 4 views
-1

リンクが上書きされている問題が重なって、スクリーンショットは次のとおりです。enter image description hereリンクはお互いが

私が使用したCSSは次のとおりです。

いずれかがこれらのリンクのHTMLを見たい場合は
.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があります:

// 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です。すてきな一日を。 –

関連する問題