css-multicolumn-layout

When using column-count, overflowing content completely disappears in all but first column, why?

半世苍凉 提交于 2019-11-27 15:38:18
问题 When using column-count in a wrapper, and the containers in the wrapper have border-radius applied, and content in the container is overflowing, the content completely disappears in all the columns, except the first one. Here is my example: https://jsfiddle.net/f4nd7tta/ The red semi-circle is only visible in the first column, why? #main_wrap{ width:100%; border:solid 1px black; -moz-column-count: 3; -webkit-column-count: 3; column-count: 3; } #main_wrap > div{ border-radius:5px; overflow

CSS columns with left-right flow

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 13:29:06
Let's say I have a div which will contain a set of elements (divs), which may have different heights, but all of them will have the same width. I've achieved this currently with isotope + masonry, but since some browsers already support CSS3 multi-columns, I was hoping to have a only-CSS solution for these browsers, falling back to Javascript for the rest. This is the CSS I've been trying: .div-of-boxes { -webkit-column-count: 3; -webkit-column-gap: 10px; -moz-column-count: 3; -moz-column-gap: 10px; column-count: 3; column-gap: 10px; } However, this makes the flow of the elements to be top

CSS multi-column layout of list items doesn't align properly in Chrome

六眼飞鱼酱① 提交于 2019-11-27 04:18:28
问题 I am building a menu system presented to the user in multi-column format. The column-count property in CSS3 gets me 90% of the way there, but I'm having difficulties with alignment under Chrome. The menu is relatively simple: an unordered list divided into multiple-columns by the column-count property columns should fill sequentially, so column-fill: auto menu items are represented as list items each list item has a a clickable anchor tag, extended fully via display: block The alignment issue

Is there a way to specify different widths for columns in CSS3?

落花浮王杯 提交于 2019-11-27 02:14:16
I would like to use CSS to present a two-column layout. The markup I am using is this <div style="-webkit-column-count: 2; -webkit-column-rule: 1px solid black; -webkit-column-width: 80px; margin-left:20px;margin-top:20px;"> <div id="picturebox" style="">picture box</div> <div id="nme">name</div> </div> Is there a way to give one column a width of 20px and one column a width of, say, 80px? No, there isn't a way. The feature is designed for content that flows between equal columns. Oriol Technically it's not possible to do it with the multi-column property only but for a 2-column layout you can

Bootstrap 4 masonry layout utilizing flexbox grid

时光毁灭记忆、已成空白 提交于 2019-11-26 14:42:19
Is there a way to create a masonry column layout utilizing the flexbox grid that Bootstrap 4 comes equipped with? It seems to me that all of the columns are equal height. This is pretty much doable with standard Bootstrap 4 classes. There is even a whole section in the documentation about the Card columns feature. From the docs: Cards can be organized into Masonry -like columns with just CSS by wrapping them in .card-columns . Cards are built with CSS column properties instead of flexbox for easier alignment. Cards are ordered from top to bottom and left to right. Heads up! Your mileage with

How to display an unordered list in two columns?

岁酱吖の 提交于 2019-11-26 11:08:49
With the following HTML, what is the easiest method to display the list as two columns? <ul> <li>A</li> <li>B</li> <li>C</li> <li>D</li> <li>E</li> </ul> Desired display: A B C D E The solution needs to be able work on Internet Explorer. Modern Browsers leverage the css3 columns module to support what you are looking for. http://www.w3schools.com/cssref/css3_pr_columns.asp CSS: ul { columns: 2; -webkit-columns: 2; -moz-columns: 2; } http://jsfiddle.net/HP85j/8/ Legacy Browsers Unfortunately for IE support you will need a code solution that involves JavaScript and dom manipulation. This means

Is there a way to specify different widths for columns in CSS3?

痴心易碎 提交于 2019-11-26 10:01:51
问题 I would like to use CSS to present a two-column layout. The markup I am using is this <div style=\"-webkit-column-count: 2; -webkit-column-rule: 1px solid black; -webkit-column-width: 80px; margin-left:20px;margin-top:20px;\"> <div id=\"picturebox\" style=\"\">picture box</div> <div id=\"nme\">name</div> </div> Is there a way to give one column a width of 20px and one column a width of, say, 80px? 回答1: No, there isn't a way. The feature is designed for content that flows between equal columns

How to display an unordered list in two columns?

拜拜、爱过 提交于 2019-11-26 01:57:23
问题 With the following HTML, what is the easiest method to display the list as two columns? <ul> <li>A</li> <li>B</li> <li>C</li> <li>D</li> <li>E</li> </ul> Desired display: A B C D E The solution needs to be able work on Internet Explorer. 回答1: Modern Browsers leverage the css3 columns module to support what you are looking for. http://www.w3schools.com/cssref/css3_pr_columns.asp CSS: ul { columns: 2; -webkit-columns: 2; -moz-columns: 2; } http://jsfiddle.net/HP85j/8/ Legacy Browsers

How to prevent column break within an element?

跟風遠走 提交于 2019-11-26 00:39:56
问题 Consider the following HTML: <div class=\'x\'> <ul> <li>Number one</li> <li>Number two</li> <li>Number three</li> <li>Number four is a bit longer</li> <li>Number five</li> </ul> </div> and the following CSS: .x { -moz-column-count: 3; column-count: 3; width: 30em; } As it stands, Firefox currently renders this similarly to the following: • Number one • Number three bit longer • Number two • Number four is a • Number five Notice that the fourth item was split between the second and third