下記のソースは、<td>から</td>までの全面でリンクするようにしているのですが、その中の文字位置が、中央はできるのですが、中段ができません。
文字を中段で表示させるためには、どのような設定にすればよいのでしょうか?
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"> <!-- table.sample { width: 520px; } table.sample td{ width: 520x; height: 30px; text-align: center; vertical-align: bottom; font-size: 12px; color: #404040; border: 1px solid #c7c7bc; background-color: #ececec; } table.sample td a{ text-decoration: none; display: block; width: 100%; height: 100%; } table.sample td a:hover{ background-color:#ffcccc; } --> </style> </head> <body> <table cellpadding="0" class="sample"> <tr> <td><a href="hoge.html">文字をセル中央・中段で表示したい。</a></td> </tr> </table> </body> </html>
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。