开发者

How can I get long texts to automatically span over several columns?

I would like to get the same behaviour that you get in Microsoft Word with several columns. When column 1 is filled, the text automatically starts in column 2.

I figured there would be a tag or technique on how to do this, but google gave me no usable re开发者_开发问答sults.

The obvious workaround would be to manually place text in three columns, but the would be a ton of work when changing the layout or font size.

Any advice?

Thanks - Codemonkey


CSS3 has a multi-column feature that does exactly this. Setting column-count: n will split the text into n columns.

Since CSS3 isn't standardized yet, Mozilla and Webkit use the -moz-column-count and -webkit-column-count properties instead. Of course, IE doesn't support it yet.


You can easily do this with JavaScript. I am not aware of any pure-CSS techniques that can do this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜