使用表单进行按钮导航和按钮不会出现

时间:2014-01-04 01:42:15

标签: html css forms button input

所以我为我的uni任务创建了一个网站,它有一个非常好的导航系统,使用两列,左边有导航按钮,使用表单和输入,导致我的网站看起来像我想要的,像这样

http://gyazo.com/38ed9ea8133e44c57209c6992d2a4554

我试图为了个人原因重新创建一个类似的网站,所以我可以一起学习更多关于CSS和HTML的功能,但由于某些原因,即使所有代码都相同,按钮也不会出现,我不能为了我的生活,看看为什么他们不会在新网站上显示。下面是我的CSS文件和下面的HTML。

如果你能明白为什么那么请告诉我! 这是我的CSS

h1 {
    color:#FFFFFF;
    text-align:center;
}
body {
    margin-top:75px;
    margin-bottom:75px;
    margin-left:30px;
    margin-right:30px;
    background-color:#A9BCF5;
}
.bt {
    width:1050px;
}
.bt tr {
    margin:0;
    padding:4px;
    align:center;
    list-style-type:none;
}
.bt td {
    align:left;
}



这是html

<!DOCTYPE html>
    <head>
    <title>
        Test4CSS
    </title>
    <link rel="stylesheet" type="text/css" href="style.css">
     <h1>Test Heading Text for the site</h1>
    </head>
        <body>
            <table class="bt">
             <tbody>
              <tr>
               <td>
            <form action="index.html>
             <input type="submit" value="Home Page">
            </form>
            <form action="page1.html>
             <input type="submit" value="The First Page">
            </form>
            <form action="page2.html>
             <input type="submit" value="The Second Page">
            </form>
            <form action="page3.html>
             <input type="submit" value="The Third Page">
            </form>
            <form action="page4.html>
             <input type="submit" value="The Fourth Page">
            </form>
            <form action="page5.html>
             <input type="submit" value="The Fifth Page">
            </form>
              </td>
              <td>
            <p>
            This is the example text for the page, to understand<br>
            a little bit about the formatting that I have put in place.
            </p>
              </td>
             </tr>
            </table>
        </body>
</html>

1 个答案:

答案 0 :(得分:1)

这很简单 - 请参阅http://codepen.io/anon/pen/iwhnJ

你的报价有些错误。

<form action="index.html">
         <input type="submit" value="Home Page">
</form>

在收盘上方&#34;遗失:<form action="index.html>所有表单元素都是这种情况,而不是<form action="page3.html>你必须写<form action="page3.html">