2017-06-17 19 views
-4

ここでは、ボタンを機能させるために必死の試みをしています。私はもう一方を追加する前にボタンが働いた。助けてください。ボタンを違うものにすることも困難でしたが、これは現在修正されています。 (そのちょうどこのAINTが重要。いくつかは、より多くのようにこれを書いた理由イムのthatsテキストに私に言って。どのようにあなたが今日やっている?)ボタンが機能しない

\t .Button { 
 
    background-color: darkcyan; 
 
    border: none; 
 
    color: black; 
 
    padding: 15px 32px; 
 
    text-align: center; 
 
    text-decoration: none; 
 
    display: inline-block; 
 
    font-size: 16px; 
 
\t font-family: hacked; 
 
\t 
 
\t 
 
} 
 

 
    .sub { 
 
    position: relative; 
 
} 
 
.itmHolder { 
 
    position: relative; 
 
} 
 

 
    
 
    
 
    .itmHolder:nth-child(2), 
 
.itmHolder:nth-child(3) { 
 
    position: absolute; 
 
    top: 0; 
 
} 
 
.og { 
 
    margin-top: 50px; 
 
    position: center; 
 
    text-align: center; 
 
}
<title>Our Future</title> 
 
\t </head> 
 
\t <!--Baggrunds farve--> 
 
\t <body bgcolor="#212f3c"> 
 
\t 
 
\t <!--Hovedskriften--> 
 
    <font size=40><center><h1 style="font-family:blowbrush;">Future</font></center></h1><form action="side2.html"> 
 
\t 
 
\t 
 
\t <div class="og"> 
 
    <div class="itmHolder"> 
 

 
    <div class="sub"> 
 
     <button type="button" class="Button">About us<form action="side2.html"></button> 
 
     <button type="button" class="Button">Buy now<form action="buynow.html"></button> 
 
    </div> 
 
</div> 
 
\t 
 
\t 
 
\t <br></br> 
 
</body> 
 
</html> 
 
    <picture> 
 
    <!--Billede--> 
 
    <br></br> 
 
    <br></br> 
 
<center><img src="CSfU23PXAAEA8et.jpg" alt="Matrix" style="width:auto;" border="5"><center/> 
 
<br></br> 
 
<br></br> 
 
<!--Youtube video--> 
 
<center><iframe width="700" height="400"src="https://www.youtube.com/embed/XGSy3_Czz8k?playlist=XGSy3_Czz8k&loop=1"></center></iframe> 
 
</picture>

+2

実際に問題を説明する必要があります。さらにテキストを追加するように指示されても、あなたの質問に無関係のスパムを追加する必要はありません。 「ボタンを動かす」以外に、あなたが達成しようとしていることを言っていないときに、どのようにあなたを助けることになっていますか? – Carcigenicate

+0

これらはディレクトリ構造上でのみ機能することを考慮すると、私は彼らが何をすべきかわからない、どのように動作するはずがわかるでしょうか? –

+0

Buddy、基本的なhtmlとcssのチュートリアルで始めてみませんか? – Ganesh

答えて

0

あなたのformタグを閉じhavnt、あなたが持っていますそれは間違った場所にある。

<div class="sub"> 
     <form action="side2.html" method="POST"> 
      <input type="submit" class="Button" value="About us"> 
     </form> 
     <form action="buynow.html" method="POST"> 
      <input type="submit" class="Button" value="Buy now"> 
     </form> 
    </div> 

をしたり、フォームを使用しない場合は、<a>タグを使用します:あなたのコードを調整し

<div class="sub"> 
     <button type="button" class="Button"><a href="side2.html">About us</a></button> 
     <button type="button" class="Button"><a href="buynow.html">Buy now</a></button> 
    </div> 
+0

私はこれを行うと、私のボタンは並んでいないが、お互いの上に並んでいない –

+0

何を使用して?フォームまたは ''タグ> –

+0

フォームの先頭にはありません。 –

0

あなたがこのよう他

<div class="sub"> 
    <form action="side2.html"> 
     <button type="submit" class="Button">About us</button> 
    </form> 
    <form action="buynow.html"> 
     <button type="submit" class="Button">Buy now</button> 
    </form> 
    </div> 

この代替方法

<div class="sub"> 
    <a href="side2.html" class="Button">About us</a> 
    <a href="buynow.html" class="Button">Buy now</a> 
</div> 

を試してみてください以下のコード部分に正しい方法で

<div class="sub"> 
     <button type="button" class="Button">About us<form action="side2.html"></button> 
     <button type="button" class="Button">Buy now<form action="buynow.html"></button> 
    </div> 

<form>タグを使用していませんお役に立てれば。

関連する問題