小编Dan*_*iel的帖子

如何居中水平表格单元格

我希望Content A,Content B和Content C列水平居中.我有这个代码试图添加

http://jsfiddle.net/hsX5q/24/

HTML:margin:0 auto to .columns-container,它不起作用.有人可以帮忙吗?

/*************************
 * Sticky footer hack
 * Source: http://pixelsvsbytes.com/blog/2011/09/sticky-css-footers-the-flexible-way/
 ************************/

/* Stretching all container's parents to full height */

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}
/* Setting the container to be a table with maximum width and height */

#container {
  display: table;
  height: 100%;
  width: 100%;
}
/* All sections (container's children) should be table rows with minimal height */

.section {
  display: table-row;
  height: 1px;
} …
Run Code Online (Sandbox Code Playgroud)

html css

16
推荐指数
2
解决办法
8万
查看次数

标签 统计

css ×1

html ×1