Table of Contents
回复讨论(解决方案)
Home Web Front-end HTML Tutorial td内放table怎么对齐_html/css_WEB-ITnose

td内放table怎么对齐_html/css_WEB-ITnose

Jun 21, 2016 am 09:05 AM

我的第二行有个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>
Copy after login


回复讨论(解决方案)

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

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


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

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

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

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


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

你后台什么语言?

你后台什么语言?


asp.net

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

同求解?!有解答的么么

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

Statement of this Website
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

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

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1669
14
PHP Tutorial
1273
29
C# Tutorial
1256
24
HTML: The Structure, CSS: The Style, JavaScript: The Behavior HTML: The Structure, CSS: The Style, JavaScript: The Behavior Apr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML, CSS, and JavaScript: Web Development Trends The Future of HTML, CSS, and JavaScript: Web Development Trends Apr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

The Future of HTML: Evolution and Trends in Web Design The Future of HTML: Evolution and Trends in Web Design Apr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML: Building the Structure of Web Pages HTML: Building the Structure of Web Pages Apr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

HTML vs. CSS vs. JavaScript: A Comparative Overview HTML vs. CSS vs. JavaScript: A Comparative Overview Apr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML vs. CSS and JavaScript: Comparing Web Technologies HTML vs. CSS and JavaScript: Comparing Web Technologies Apr 23, 2025 am 12:05 AM

HTML, CSS and JavaScript are the core technologies for building modern web pages: 1. HTML defines the web page structure, 2. CSS is responsible for the appearance of the web page, 3. JavaScript provides web page dynamics and interactivity, and they work together to create a website with a good user experience.

HTML: Is It a Programming Language or Something Else? HTML: Is It a Programming Language or Something Else? Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

What is the difference between <strong>, <b> tags and <em>, <i> tags? What is the difference between <strong>, <b> tags and <em>, <i> tags? Apr 28, 2025 pm 05:42 PM

The article discusses the differences between HTML tags , , , and , focusing on their semantic vs. presentational uses and their impact on SEO and accessibility.

See all articles