search
HomeWeb Front-endHTML Tutorialtd内放table怎么对齐_html/css_WEB-ITnose

我的第二行有个td:colspan="16",里面又放了个table,怎么样才能让外边框消失并和td重叠呢
另外table内的TD要与上面一行的表头对齐
目前是这样
想要这样

<style type="text/css"><!--.T_Sample {  border-collapse: collapse;  border: none;  background: #FFFFEE;}.T_Sample th {  border: solid 1px #000000;}.T_Sample td {  border: solid 1px #000000;}.T_table td{    border:1px solid black;    }--></style><table class="T_Sample" border="1" cellpadding="2" cellspacing="0" width="100%">    <tr>        <td>            <asp:CheckBox ID="CheckBox1" runat="server" />        </td>        <td>            订单来源        </td>        <td style="width: 55px">            日期        </td>        <td style="width: 50px">            订单号        </td>        <td>            销售总金额        </td>        <td>            优惠金额        </td>        <td>            订单总金额        </td>        <td>            订单状态        </td>        <td>            产品单价        </td>        <td>            产品变体ID        </td>        <td style="width: 26px">            产品链接        </td>        <td style="width: 80px">            属性及标题        </td>        <td style="width: 70px">            SKU        </td>        <td style="width: 26px">            产品数量        </td>        <td>            中文名称        </td>        <td style="width: 40px">            建议供应商        </td>        <td style="width: 40px">            实际供应商        </td>        <td>            建议采购价        </td>        <td>            实际采购价        </td>        <td>            收益        </td>        <td>            采购状态        </td>        <td>            采购备注        </td>        <td>            是否发货        </td>        <td>            延迟天数        </td>        <td>            编辑        </td>    </tr>    <tr>        <td >            <asp:CheckBox ID="CheckBox2" runat="server" />        </td>        <td >            HobbyWow        </td>        <td >            2013/3/9 23:43:27        </td>        <td >            <a href="../Administration/PurchaseOrdersByLogistics.aspx">31617</a>        </td>        <td >            $8.57        </td>        <td >            $0.00        </td>        <td >            $14.24        </td>        <td >        </td>        <td colspan="16">        <table  class="T_Sample" border="1" cellpadding="2" cellspacing="0" width="100%">        <tr>        <td>            $1.49        </td>        <td>            33258        </td>        <td>            <a href="#">预览</a>        </td>        <td>            <a class="sidebar" title="Rotor blade for Hubsan X4 H107 H107-A02,">Rotor blade...</a>        </td>        <td>            H107-A02        </td>        <td>            2        </td>        <td>            风叶H107-A02        </td>        <td>            大家乐        </td>        <td>        </td>        <td>            $6.00        </td>        <td>        </td>        <td>        </td>        <td>        </td>        <td>        </td>        <td>            已发货        </td>        <td>        </td>               </tr>        <tr>        <td>            $9.49        </td>        <td>            33257        </td>        <td>            <a href="#">预览</a>        </td>        <td>            <a class="sidebar" title="Rotor blade for Hubsan X4 H107 H107-A02,">Rotor blade...</a>        </td>        <td>            H107-A02        </td>        <td>            2        </td>        <td>            风叶H107-A02        </td>        <td>            大家乐        </td>        <td>        </td>        <td>            $6.00        </td>        <td>        </td>        <td>        </td>        <td>        </td>        <td>        </td>        <td>            已发货        </td>        <td>        </td>               </tr>        </table>        </td>        <td>                    <a>编辑</a>                </td>    </tr>    </table>


回复讨论(解决方案)

这个是一个表格的效果,不用做成表格套表格,而是你要纵向合并第一和第二个单元格

这个是一个表格的效果,不用做成表格套表格,而是你要纵向合并第一和第二个单元格


不行 我故意做成这样的。因为第二个表格我要循环动态加载的。
你所说的第一二三列 纵向合并我做出来了 就是我图2显示。但是满足不了我的需求。

循环动态加载一样可以,先取要加载多少行,再去合并第一第二列,再加上后面的。

你这样做反而处理更复杂,合并前面的单元格处理起来反而简单得多。

你这样做反而处理更复杂,合并前面的单元格处理起来反而简单得多。


这样做满足不了后面的循环需求 大哥 我要循环tr的 2个半截的tr怎么循环 

你后台什么语言?

你后台什么语言?


asp.net

......asp.net没用过,你发点代码出来看看,就是子table循环那部分。

同求解?!有解答的么么

http://wenwen.sogou.com/z/q206330112.htm

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What is the difference between an HTML tag and an HTML attribute?What is the difference between an HTML tag and an HTML attribute?May 14, 2025 am 12:01 AM

HTMLtagsdefinethestructureofawebpage,whileattributesaddfunctionalityanddetails.1)Tagslike,,andoutlinethecontent'splacement.2)Attributessuchassrc,class,andstyleenhancetagsbyspecifyingimagesources,styling,andmore,improvingfunctionalityandappearance.

The Future of HTML: Evolution and TrendsThe Future of HTML: Evolution and TrendsMay 13, 2025 am 12:01 AM

The future of HTML will develop in a more semantic, functional and modular direction. 1) Semanticization will make the tag describe the content more clearly, improving SEO and barrier-free access. 2) Functionalization will introduce new elements and attributes to meet user needs. 3) Modularity will support component development and improve code reusability.

Why are HTML attributes important for web development?Why are HTML attributes important for web development?May 12, 2025 am 12:01 AM

HTMLattributesarecrucialinwebdevelopmentforcontrollingbehavior,appearance,andfunctionality.Theyenhanceinteractivity,accessibility,andSEO.Forexample,thesrcattributeintagsimpactsSEO,whileonclickintagsaddsinteractivity.Touseattributeseffectively:1)Usese

What is the purpose of the alt attribute? Why is it important?What is the purpose of the alt attribute? Why is it important?May 11, 2025 am 12:01 AM

The alt attribute is an important part of the tag in HTML and is used to provide alternative text for images. 1. When the image cannot be loaded, the text in the alt attribute will be displayed to improve the user experience. 2. Screen readers use the alt attribute to help visually impaired users understand the content of the picture. 3. Search engines index text in the alt attribute to improve the SEO ranking of web pages.

HTML, CSS, and JavaScript: Examples and Practical ApplicationsHTML, CSS, and JavaScript: Examples and Practical ApplicationsMay 09, 2025 am 12:01 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

How do you set the lang attribute on the  tag? Why is this important?How do you set the lang attribute on the tag? Why is this important?May 08, 2025 am 12:03 AM

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

What is the purpose of HTML attributes?What is the purpose of HTML attributes?May 07, 2025 am 12:01 AM

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools