flexbox

Flex equal height column but respect max height of another column [duplicate]

删除回忆录丶 提交于 2019-12-24 02:28:08
问题 This question already has answers here : One flex item sets the height limit for siblings (4 answers) Closed 2 years ago . How does I make the below code work just with CSS (flex) and without Javascript, the second column have dynamic list of content for which I need to apply scroll bar depending upon the height of first column. HTML <div class="row d-flex"> <div class="col-lg-6 mx-200"> <img class="img-responsive" src="lorem.jpg"/> </div> <div class="col-lg-6 respect-left-col-height of-a">

Flex item is not shrinking smaller than its content [duplicate]

烂漫一生 提交于 2019-12-24 02:23:23
问题 This question already has answers here : text-overflow ellipsis on flex child not working [duplicate] (4 answers) Why don't flex items shrink past content size? (1 answer) Closed 2 years ago . I have a list of elements that I'm showing for the user together with an Icon and two Buttons. So far so good, but I want this list to scale to mobile devices and shrink when necessary. When the text inside the list is too long it prevents the page to shrink and forces a horizontal scrollbar to show.

Polymer 1.0 - Responsive columns

半世苍凉 提交于 2019-12-24 02:13:50
问题 Here is what I want to achieve with Polymer Elements: Polymer Structure The column size is not always the same width but relative to the screen or warpper-div size. In example 1, it's each 16.66%, in example 2 it is 33.33%, in example 3 it should be 100%. I need a responsive layout where -dependent upon the screen size- a different number of columns is displayed per row and each of their column sizes will be adjusted. Does anyone know how I can achieve this with https://elements.polymer

Normalizing Flexbox overflow in IE11

怎甘沉沦 提交于 2019-12-24 02:09:46
问题 Take a look at the code sample below in each Chrome and IE11. In Chrome, the <main> background stops at the edge of the .container element, which is desired. In IE it spills outside of the .container element: What I'm looking for: I want IE to have the <main> element end at the edge of the .container element in the case of .container2, it's displaying properly: the <main> element should only take up as much height as it needs. .container { height:400px; background:#333; display:flex; flex

Child span element getting out of parent element, flexbox / margin - padding issue

送分小仙女□ 提交于 2019-12-24 01:56:49
问题 I read post on similar issue but still not able to get it working. I am trying to have text ellipses when there is big text. JSFiddle .fixIssue { align-items: center; } .thumbnail { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; } .imgDiv { border: 1px solid yellow; width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-around; } .textSpanInner { display: flex; justify-content: flex-start; align-items: center; } .linkStyle { display: block;

drop down menu pushes away the div below

不羁岁月 提交于 2019-12-24 01:37:19
问题 When hovering the menu, the submenu "repulses" the next div. How is it possible to keep the div fixed in position underneath? Here is my code: * { box-sizing: border-box; } body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; } .main-navigation { width: 60%; margin: 0 auto; } .main-navigation ul { margin: 0; padding-left: 0; list-style: none; display: flex; //justify-content:flex-end; } .main-navigation li { flex: 1; } .main-navigation a { display: block; text-align: center;

Nested flexboxes not wrapping in chrome or IE

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 01:23:54
问题 I have a few nested flexboxes that I want to use for a responsive website, and they work properly in firefox, but not in chrome or IE. The links should be able to wrap so that they are on top of one another when you make the screen smaller. The links wrap properly here: http://jsfiddle.net/6796b/ But when they are in another flexbox they stop wrapping and overflow (Note: Only the green "links" aren't wrapping/stacking properly. Everything else works as intended.): http://jsfiddle.net/3525C/8/

Fixed element inside flexbox item

雨燕双飞 提交于 2019-12-24 00:54:08
问题 I have a fixed element in a left sidebar. The left sidebar is an item of a flexbox. When I apply position:fixed; to the fixed element, the flexbox item containing it collapses and my fixed element undesirably overlaps my page content. I've tried using position:sticky; top:0; instead however the sticky element undesirably clings to the top of page. I'm unable to apply a margin. body { margin: 0; } header { border-bottom: 1px solid; } footer { border-top: 1px solid; } #content { display: flex;

Pure CSS Masonry Layout without defined columns

怎甘沉沦 提交于 2019-12-24 00:49:11
问题 I wrote a layout as depicted above. I implemented this with the simple usage of display: inline-block and article elements that have different widths and heights, like so: width: 50%; /* this is variable*/ height: 160px; /* this is also variable*/ padding: 10px; box-sizing: border-box; display: inline-block; vertical-align: top; Now this already works quite okish, but: You see the gap above boxes 4 and 5 ? Can I write a pure CSS layout that makes these boxes fill up the space directly below 1

Flexbox vertical text alignment

点点圈 提交于 2019-12-24 00:46:54
问题 Using Flexbox, I'm trying to achieve this: But I'm instead reaching this point: Here is what I've got so far (vendor prefixes omitted). If someone could help get this working well in either Firefox or Chrome, I'd very much appreciate it. img { max-width: 100%; } .container { display: flex; justify-content: center; flex-wrap: wrap; } .item, .img-wrapper { align-items: center; } .item { display: flex; flex-direction: column; width: 300px; } .img-wrapper { flex-grow: 1; flex-shrink: 0; } <div