3列,中心柱固定,侧面填充父母 [英] 3 columns, center column fixed, sides fill parents
本文介绍了3列,中心柱固定,侧面填充父母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使B的大小固定为800px,而A和C填充空间,所以他们都在一起接触? http://jsfiddle.net/8ufuV/
How can I make B be a fixed 800px size while A and C fill the space, so they are all together touching? http://jsfiddle.net/8ufuV/
推荐答案
最简单的方法是使用 display:table-cell
。
查看: http://jsfiddle.net/47d4f/
这解决了您的问题,并且当每个列中的内容不同时,还会给您等高列。
That solves your problem, and also gives you equal height columns when the content is different in each column - something that isn't otherwise simple to obtain.
浏览器支持: http://caniuse.com/css-table
这篇关于3列,中心柱固定,侧面填充父母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文