css-multicolumn-layout

Can I order my CSS columns horizontally instead of vertically?

自闭症网瘾萝莉.ら 提交于 2019-12-09 04:15:19
问题 Here is my code: .column { column-count: 4; column-gap: 10px; -moz-column-count: 4; -moz-column-gap: 10px; -webkit-column-count: 4; -webkit-column-gap: 10px; } <div class="column"> <div class="inner">1</div> <div class="inner">2</div> <div class="inner">3</div> <div class="inner">4</div> <div class="inner">5</div> <div class="inner">6</div> <div class="inner">7</div> <div class="inner">8</div> <div class="inner">9</div> <div class="inner">10</div> <div class="inner">11</div> <div class="inner

With column-count, can you dynamically change from 3 to 2 columns if the resolution smaller?

岁酱吖の 提交于 2019-12-08 19:28:34
问题 I'm using the column-count property to set a page with multiple divs at three columns, which looks great on larger screens. Each div has a fixed width of, say, 500px (contained images). When working on smaller screens however, the browser tries to force the content within the original \three columns when it should go to two columns. Is there a preferred best method to have the content go to two columns when the content starts to overlap? 回答1: If you use the column-width property, rather than

Why does Safari render CSS multi-column layout differently?

佐手、 提交于 2019-12-06 21:42:56
问题 I'm building a website and testing it on Chrome mostly, intermittently checking if it still works on Firefox. I figured that, since both Chrome and Safari run on WebKit, they would render the website identically. This is not the case though. I was checking the site on Safari and I noticed that my menu bar, which uses an unordered list with column-count (both -moz- and -webkit- with the same value), and noticed that there is a difference between the filling of the columns. Chrome seems to fill

Why does Safari render CSS multi-column layout differently?

≡放荡痞女 提交于 2019-12-05 04:09:31
I'm building a website and testing it on Chrome mostly, intermittently checking if it still works on Firefox. I figured that, since both Chrome and Safari run on WebKit, they would render the website identically. This is not the case though. I was checking the site on Safari and I noticed that my menu bar, which uses an unordered list with column-count (both -moz- and -webkit- with the same value), and noticed that there is a difference between the filling of the columns. Chrome seems to fill the columns evenly while Safari just fills the columns one by one. The images below illustrate this.

CSS3 multi column layout IE workaround [closed]

♀尐吖头ヾ 提交于 2019-12-04 16:42:04
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I've stumbled across a really great project (CSS3 PIE) today that makes it possible to use CSS3 rounded corners, shadows and gradients even in IE6, IE7 and IE8 using CSS settings and usual CSS3 notation. It uses *.htc file that does the trickery and makes it really transparent for developers (as in set it and

CSS3 multi column layout IE workaround [closed]

南楼画角 提交于 2019-12-03 11:48:58
I've stumbled across a really great project (CSS3 PIE) today that makes it possible to use CSS3 rounded corners, shadows and gradients even in IE6, IE7 and IE8 using CSS settings and usual CSS3 notation. It uses *.htc file that does the trickery and makes it really transparent for developers (as in set it and forget it - no additional script calls when creating new pages or changing existing ones (provided you don't change CSS)). I wonder if there's anything similar for multi column layout that can be used. Floating is not an option because content is not laid out top to bottom - left to right

Can I order my CSS columns horizontally instead of vertically?

僤鯓⒐⒋嵵緔 提交于 2019-12-02 20:39:27
Here is my code: .column { column-count: 4; column-gap: 10px; -moz-column-count: 4; -moz-column-gap: 10px; -webkit-column-count: 4; -webkit-column-gap: 10px; } <div class="column"> <div class="inner">1</div> <div class="inner">2</div> <div class="inner">3</div> <div class="inner">4</div> <div class="inner">5</div> <div class="inner">6</div> <div class="inner">7</div> <div class="inner">8</div> <div class="inner">9</div> <div class="inner">10</div> <div class="inner">11</div> <div class="inner">12</div> </div> The result is: 1 4 7 10 2 5 8 11 3 6 9 12 What I want is: 1 2 3 4 5 6 7 8 9 10 11 12

Prevent element fragmentation in multi-column layout

回眸只為那壹抹淺笑 提交于 2019-12-01 04:58:13
问题 Given this code: #wrapper { border:2px solid red; padding:10px; width:310px; height:310px; -webkit-column-width:150px; -webkit-column-gap:10px; -moz-column-width:150px; -moz-column-gap:10px; column-width:150px; column-gap:10px; } #wrapper > div { width:150px; background:#ccc; margin-bottom:10px; white-space:no-break; } <div id="wrapper"> <div>FIRST BOX: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi porttitor imperdiet dolor sit amet placerat. Phasellus vestibulum enim sed dui

Chrome columns bug when number of columns is less then column-count

寵の児 提交于 2019-11-30 16:27:50
I'm having an issue with Chrome when I use the column-count property. I have a div where inside it I will have some items so I set column-count: 3; When I have 3 items or more it works well, but when I have only two they are not shown in the same row but in the same column. This happens only on Chrome. code example: .userinfo-content .grid-view.author-profile-tabs { .column-count(3); .column-gap(30); .article { position:relative; display: inline-block; margin-bottom: 40px; width: 100%; line-height: 1.3; } } Based on how your markup looks like, the break-inside: avoid-column; should fix that,

How can I create multi columns from a single unordered list?

时光毁灭记忆、已成空白 提交于 2019-11-30 11:52:54
问题 I'd like to create a multi column list like this: https://jsfiddle.net/37dfwf4u/ No problem when using a different list for each column: <ul> <li>item1</li> <li>item2</li> <li>item3</li> <li>item4</li> </ul> <ul> <li>item5</li> <li>item6</li> <li>item7</li> <li>item8</li> </ul> ul { display:inline-block; } However, can this be done by a continuous list and pure CSS so that the CSS arranges the columns automatically? E.g. by use of flex layout which I'm not yet familiar with? 回答1: Yes, you can