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

发布于 2016-10-15 22:52:37
在开始编写css时使用Reset Css!
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
https://stackoverflow.com/questions/40060159
复制相似问题