首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >没有与顶部对齐的边框的嵌套表

问没有与顶部对齐的边框的嵌套表
EN

Stack Overflow用户
提问于 2016-10-15 22:20:52
回答 1查看 144关注 0票数 1

我想要将嵌套的表格与顶部对齐。但行中的不匹配表明情况并非如此。我想我已经从表格中去掉了所有的边框大小,填充,间距,但仍然有一些东西阻止了它真正的顶部对齐。

代码语言:javascript
复制
display:inline-table;
vertical-align:top;
border-style: dotted;
border-width: 0px;
border-spacing: 0px; /* Removes the cell spacing via CSS */
border-collapse: collapse;  /* no double border where cells touch */
padding: 0px;

​

​

MWE:https://jsfiddle.net/n89bsc4g/

EN

回答 1

Stack Overflow用户

发布于 2016-10-15 22:52:37

在开始编写css时使用Reset Css!

代码语言:javascript
复制
    html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

查看jsFiddle

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40060159

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档