Maison >interface Web >tutoriel HTML >表格的嵌套_html/css_WEB-ITnose

表格的嵌套_html/css_WEB-ITnose

WBOY
WBOYoriginal
2016-06-24 12:07:221115parcourir


上图是我想做出的效果。但做出来的效果是这样(如下图),弄了挺久,但还是有点问题,所以想求救大神。(刚学html,代码比较乱。)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head><body><!--table width="600" border="1" cellspacing="0" cellpadding="0"--><table border="1">   <tr>    <td colspan="6" align="center">主题网站名称</td>  </tr>  <tr colspan="6">        <td>导航内容一</td>        <td>导航内容二</td>        <td>导航内容三</td>        <td>导航内容四</td>		<td>导航内容五</td>        <td>导航内容六</td>  </tr>   <tr>     <td><table frame="void" width="200" border="1" cellspacing="0" cellpadding="0">      <tr align="center">        <td>图片1</td>      </tr>       <tr align="center">        <td>图片1链接点</td>              </tr>      <tr align="center">        <td>图片2</td>             </tr>	  <tr align="center">        <td>图片2链接点</td>             </tr>	  <tr align="center">        <td>图片3</td>             </tr>	  <tr align="center">        <td>图片3链接点</td>             </tr>    </table></td>    <td><table frame="void" width="200" border="1" cellspacing="0" cellpadding="0">     大幅照片或者Flash流文件    </table></td>     <td><table frame="void" width="200" border="1" cellspacing="0" cellpadding="0">      <tr align="center">        <td>图片4</td>      </tr>      <tr align="center">        <td>图片4链接点</td>        </tr>      <tr align="center">        <td>图片5</td>       </tr>	  <tr align="center">        <td>图片5链接点</td>       </tr>	  <tr align="center">        <td>图片6</td>             </tr>	  <tr align="center">        <td>图片链接点</td>             </tr>	  </table></td>  </tr>  <tr>    <td colspan="6" align="center">站点设计开发人员</td>  </tr></table></body></html>


回复讨论(解决方案)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><!--table width="600" border="1" cellspacing="0" cellpadding="0"--><table border="1">   <tr>    <td colspan="6" align="center">主题网站名称</td>  </tr>  <tr colspan="6">        <td>导航内容一</td>        <td>导航内容二</td>        <td>导航内容三</td>        <td>导航内容四</td>    <td>导航内容五</td>        <td>导航内容六</td>  </tr>   <tr>     <td><table frame="void" width="200" border="1" cellspacing="0" cellpadding="0">      <tr align="center">        <td>图片1</td>      </tr>       <tr align="center">        <td>图片1链接点</td>              </tr>      <tr align="center">        <td>图片2</td>             </tr>    <tr align="center">        <td>图片2链接点</td>             </tr>    <tr align="center">        <td>图片3</td>             </tr>    <tr align="center">        <td>图片3链接点</td>             </tr>    </table></td>    <td colspan="4"><table frame="void" width="200" border="1" cellspacing="0" cellpadding="0">     大幅照片或者Flash流文件    </table></td>     <td><table frame="void" width="200" border="1" cellspacing="0" cellpadding="0">      <tr align="center">        <td>图片4</td>      </tr>      <tr align="center">        <td>图片4链接点</td>        </tr>      <tr align="center">        <td>图片5</td>       </tr>    <tr align="center">        <td>图片5链接点</td>       </tr>    <tr align="center">        <td>图片6</td>             </tr>    <tr align="center">        <td>图片链接点</td>             </tr>    </table></td>  </tr>  <tr>    <td colspan="6" align="center">站点设计开发人员</td>  </tr></table></body></html>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head><body><!--table width="600" border="1" cellspacing="0" cellpadding="0"--><table border="1">   <tr>    <td colspan="6" align="center">主题网站名称</td>  </tr>  <tr colspan="6" align="center">        <td>导航内容一</td>        <td>导航内容二</td>        <td>导航内容三</td>        <td>导航内容四</td>    <td>导航内容五</td>        <td>导航内容六</td>  </tr>   <tr>     <td><table frame="void" width="200" border="1" cellspacing="0" cellpadding="0" >      <tr align="center">        <td>图片1</td>      </tr>       <tr align="center">        <td>图片1链接点</td>              </tr>      <tr align="center">        <td>图片2</td>             </tr>    <tr align="center">        <td>图片2链接点</td>             </tr>    <tr align="center">        <td>图片3</td>             </tr>    <tr align="center">        <td>图片3链接点</td>             </tr>    </table></td>    <td colspan="4"><table frame="void" width="200" border="0" cellspacing="0" cellpadding="0" align="center">     <tr><td>大幅照片或者Flash流文件</td></tr>    </table></td>     <td><table frame="void" width="200" border="1" cellspacing="0" cellpadding="0">      <tr align="center">        <td>图片4</td>      </tr>      <tr align="center">        <td>图片4链接点</td>        </tr>      <tr align="center">        <td>图片5</td>       </tr>    <tr align="center">        <td>图片5链接点</td>       </tr>    <tr align="center">        <td>图片6</td>             </tr>    <tr align="center">        <td>图片链接点</td>             </tr>    </table></td>  </tr>  <tr>    <td colspan="6" align="center">站点设计开发人员</td>  </tr></table></body></html>

做了下改进

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head> <body><!--table width="600" border="1" cellspacing="0" cellpadding="0"--><table border="1">   <tr>    <td colspan="6" align="center">主题网站名称</td>  </tr>  <tr colspan="6" align="center">    <td colspan="6"><table width="100%" border="1" cellspacing="0" cellpadding="0">      <tr>        <td align="center">导航内容一</td>        <td align="center">导航内容二</td>        <td align="center">导航内容三</td>        <td align="center">导航内容四</td>        <td align="center">导航内容五</td>        <td align="center">导航内容六</td>      </tr>    </table></td>  </tr>   <tr>     <td><table frame="void" width="200" border="1" cellspacing="0" cellpadding="0" >      <tr align="center">        <td>图片1</td>      </tr>       <tr align="center">        <td>图片1链接点</td>              </tr>      <tr align="center">        <td>图片2</td>             </tr>    <tr align="center">        <td>图片2链接点</td>             </tr>    <tr align="center">        <td>图片3</td>             </tr>    <tr align="center">        <td>图片3链接点</td>             </tr>     </table></td>    <td colspan="4"><table frame="void" width="200" border="0" cellspacing="0" cellpadding="0" align="center">     <tr><td>大幅照片或者Flash流文件</td></tr>    </table></td>     <td><table frame="void" width="200" border="1" cellspacing="0" cellpadding="0">      <tr align="center">        <td>图片4</td>      </tr>      <tr align="center">        <td>图片4链接点</td>        </tr>      <tr align="center">        <td>图片5</td>       </tr>    <tr align="center">        <td>图片5链接点</td>       </tr>    <tr align="center">        <td>图片6</td>             </tr>    <tr align="center">        <td>图片链接点</td>             </tr>    </table></td>  </tr>  <tr>    <td colspan="6" align="center">站点设计开发人员</td>  </tr> </table></body></html>

谢谢,大神的指点!

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn