2017-05-09 11 views
-3

テーブル内のハイパーリンクを使用する際に問題があります。コードの構造は次のようにされていますテーブルのHTML5ハイパーリンクが機能していませんか?

<table align="center" border="1"> 
    <tr> 
     <td> 
      <a href="...">Some text here</a>  
     </td> 
    </tr> 
</table> 

問題は、唯一の作品、<div id="pages_1"><div id="pages_2">の間に違いはないように思えるもののていること、です。

問題になることはできません
<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="UTF-8"> 
    <title>Hello</title> 


    <style> 
     #pages_1 { position: absolute; visibility: visible; left :0px; right :600px; top:100px; z-index: 1000;} 
    </style> 
    <style> 
     #pages_2 { position: absolute; visibility: visible; left: 0px; right :100px; top:100px; z-index: 1002;} 
    </style> 
</head> 
<body> 
<center> 
    <h1> 
     a 
    </h1> 
</center> 

<div id="pages_1"> 
    <table align="center" border="1"> 
     <tr> 
      <th> 
       <a href="http://www.ubisoft.com"> -----this works----- 
        a 
       </a> 
      </th> 
     </tr> 
    </table> 
</div> 
<div id="pages_2"> 
    <table align="center" border="1"> 
     <tr> 
      <th> 
       <a href="http://www.ubisoft.com"> ------this doesn't------- 
        a 
       </a> 
      </th> 
     </tr> 
    </table> 
</div> 
</body> 
</html> 
+2

。 CSSを共有したいですか? – Johannes

+2

"またいくつかのCSSコード..."そのCSSを共有したいですか? –

+0

実際には動作しない実際のコードを貼り付ける必要があります。**あなたが今作成したコードのコピーではありません。 – Martin

答えて

0

:何か他のものは、リンクをクリックしてからあなたを防ぐれていないことを確認するために

<table align="center" border="1"> 
 
    <tr> 
 
     <td> 
 
      <a href="https://www.google.com">Some text here</a> 
 
     </td> 
 
    </tr> 
 
</table>

チェック。

+0

thnx brah私は問題がCSSだと思う – Programmer

-1

それは働いていない理由を私は理解していない:/ しかし、ここではそれが働いていることがある

<table align="center" border="1"> 
 
    <tr> 
 
     <td>Google</td> 
 
     <td> 
 

 
      <a href="https://google.com">Link</a> 
 
     </td> 
 
    </tr> 
 
    <tr> 
 
     <td>Facebook</td> 
 
     <td> 
 
      <a href="https://facebook.com">Link</a> 
 
     </td> 
 
    </tr> 
 
</table>

-1
ここ

私はあなたの要件にスニペットを追加しています...基本コードテーブルとは何かを持つことができない

a{ 
 
text-decoration:none; 
 
color: white; 
 
} 
 
a:hover { 
 
    color: gray; 
 
} 
 
table { 
 
    border-style: solid; 
 
    border-width:5px; 
 
    border-color:lightblue green blue yellow; 
 
}
<table align="center" bgcolor="red"> 
 
    <tr> 
 
     <td> 
 
      <a href="https://www.google.com">Some text here</a> 
 
     </td> 
 
    </tr> 
 
</table>

+0

あなたの例でうまく動作します。 – ceejayoz

+0

ようこそスタックオーバーフロー!このコードスニペットをありがとうございます。すぐに役立つかもしれません。適切な説明は(* meta.stackexchange.com/q/114762)その教育上の価値を*なぜ*これが問題の良い解決策であるかを示すことで大幅に改善し、それによって同様の将来の読者にとってより有用になります。同じではない、質問。説明を追加するためにあなたの答えを[編集]し、どんな制限と前提が適用されるかを示してください。 –

関連する問題