Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.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构建问题_Html_Css - Fatal编程技术网

Html构建问题

Html构建问题,html,css,Html,Css,我构建了一个HTML表: <table cellpadding="0" cellspacing="0" border="0" style="width:1000px" id="maintable"> <thead> <tr> <th class="asc" width="30"><h3>ID</h3></th> <th width="200"><h3>N

我构建了一个HTML表:

<table cellpadding="0" cellspacing="0" border="0" style="width:1000px" id="maintable">
  <thead>
    <tr>
      <th class="asc" width="30"><h3>ID</h3></th>
      <th width="200"><h3>Name</h3></th>
      <th width="200"><h3>Artist</h3></th>
      <th width="150"><h3>Album</h3></th>
      <th width="60"><h3>Time</h3></th>    
    </tr>
  </thead>    
    <tr class="evenrw">
      <td class="evensl" align="center">i++</td>
      <td align="left"><a href="link">link name</a></td>
      <td align="left">name</td>
      <td align="left">name</td>
      <td align="center">name</td>   
    <tr>
<table>  

身份证件
名称
艺术家
专辑
时间
</thead>
我++
名称
名称
名称

问题是,当我把一些东西放在一行中,使整个表变大时,有没有办法使单元格的
高度
,而不是单元格的
宽度

将表宽设置为1000px,将单个表列设置为总计约600px。表格与宽度有点混淆,因此删除style=“1000px”应该可以解决问题

如果答案有效,请将其标记为所选答案:)

第二部分

要在表格上方添加横幅,只需在表格上方添加另一个
。是的

<div id="banner_or_something">
    <!-- INSERT BANNER CODE HERE-->
</div>
<table cellpadding="0" cellspacing="0" border="0" style="width:1000px" id="maintable">
    <!--TABLE CODE HERE-->
</table>

您的表格宽度设置为1000px,单个表格列的总宽度设置为600px左右。表格与宽度有点混淆,因此删除style=“1000px”应该可以解决问题

如果答案有效,请将其标记为所选答案:)

第二部分

要在表格上方添加横幅,只需在表格上方添加另一个
。是的

<div id="banner_or_something">
    <!-- INSERT BANNER CODE HERE-->
</div>
<table cellpadding="0" cellspacing="0" border="0" style="width:1000px" id="maintable">
    <!--TABLE CODE HERE-->
</table>

将CSS div&class与td标记一起使用将对您有所帮助。 e、 g


我希望它能帮助您使用CSS div&class和td标签。 e、 g


我希望它能帮助你

尝试用CSS强制加宽;这会将内容推到一起,使单元格更高以容纳所有内容。检查此问题的答案。[Word wrap in a html table][1][1]:但问题是,如果我有一个小文本,我只需要一行,但如果文本很长,我需要两行。请尝试使用CSS强制加宽;这会将内容推到一起,使单元格更高以容纳所有内容。检查此问题的答案。[Word wrap in a html table][1][1]:但问题是,如果我有一个小文本,我只需要一行,但如果文本很长,我需要两行。如果我在表的顶部有一个横幅,需要与表的宽度相同?然后将其添加到上面的代码中,以便我们可以处理所有代码。你的横幅有多宽?它是在桌子里面,还是在桌子上面?它是去下面还是上面。。。如果上面提到的话,这有点像是一个故事,但那是另一个故事。你能提供一些更多的信息吗…宽度就像表格:1000,它在表格上方,如果我在表格顶部有一个横幅,它需要与表格的宽度相同吗?然后将它添加到上面的代码中,这样我们就可以处理你的所有代码。你的横幅有多宽?它是在桌子里面,还是在桌子上面?它是去下面还是上面。。。如果上面提到的话,这有点像是一个故事,但那是另一个故事。你能提供更多的信息吗?…宽的像桌子:1000,在桌子上面