Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html css在中间对齐标题链接 我设法把输入放在屏幕中间,正如你在这里可以看到的_Html_Css - Fatal编程技术网

Html css在中间对齐标题链接 我设法把输入放在屏幕中间,正如你在这里可以看到的

Html css在中间对齐标题链接 我设法把输入放在屏幕中间,正如你在这里可以看到的,html,css,Html,Css,HTML 但是,我还想把标题链接放在中间,使输入受益。我怎样才能做到这一点 谢谢。像这样吗 补充:这里?在“输入”下,我不确定您为什么需要使用表格,也不确定我是否正确理解您的问题,但这就是您想要的吗 小提琴链接: 基本上,我就是这么做的: <div id="container"> <table id="myTable"> <tr> <td> <input type="text"/> &

HTML

但是,我还想把标题链接放在中间,使输入受益。我怎样才能做到这一点

谢谢。

像这样吗


补充:这里?在“输入”下,我不确定您为什么需要使用表格,也不确定我是否正确理解您的问题,但这就是您想要的吗

小提琴链接:

基本上,我就是这么做的:

<div id="container">
  <table id="myTable">
    <tr>
      <td>
        <input type="text"/>
      </td>
    <td>
        <input type="text"/>
    </td>
</tr>
<tr>
    <td colspan="2">
        <a href="#">Testing</a>
        <a href="#">Longer link goes here</a>
    </td>
</tr>

}

您需要提供更多细节,例如,您希望它看起来如何的模型会有所帮助。此外,您应该在问题中列出您的代码,以防JSFIDLE出现问题。@agbb为什么我不应该使用表格?@Danko请参见下面的答案。@user3243925您应该使用表格来显示表格内容。但是要标记布局,您应该使用语义。如果您使用相应的标记,它也是一个更可读的标记。是和否。我不希望它创建第二行。我希望它继续在同一行上。
table.header{
    width: 100%; 
        margin: 0; 
        height: 85px;
    background: #D9D9D9
}
<div id="container">
  <table id="myTable">
    <tr>
      <td>
        <input type="text"/>
      </td>
    <td>
        <input type="text"/>
    </td>
</tr>
<tr>
    <td colspan="2">
        <a href="#">Testing</a>
        <a href="#">Longer link goes here</a>
    </td>
</tr>
#container {
text-align:center; 
vertical-align:middle;
background-color: #cccccc;
}

#myTable {
margin-left:auto;
margin-right:auto;