flexbox

I can't set zero left/right with any css command [closed]

六月ゝ 毕业季﹏ 提交于 2021-02-05 12:35:23
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed yesterday . Improve this question I tried and tried also searched on other questions but I couldn't set what I want display settings. I am sorry but I can't give small reproducible code because I don't know what is exactly the problem. As you can see below image, I want to show the logo on leftest point of <nav>

I can't set zero left/right with any css command [closed]

亡梦爱人 提交于 2021-02-05 12:33:07
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed yesterday . Improve this question I tried and tried also searched on other questions but I couldn't set what I want display settings. I am sorry but I can't give small reproducible code because I don't know what is exactly the problem. As you can see below image, I want to show the logo on leftest point of <nav>

In CSS Flexbox, why are there no “justify-items” and “justify-self” properties?

懵懂的女人 提交于 2021-02-05 09:38:02
问题 Consider the main axis and cross axis of a flex container: Source: W3C To align flex items along the main axis there is one property: justify-content To align flex items along the cross axis there are three properties: align-content align-items align-self In the image above, the main axis is horizontal and the cross axis is vertical. These are the default directions of a flex container. However, these directions can be easily interchanged with the flex-direction property. /* main axis is

Eliminate “padding” (visual space) with object-fit, or, how do you scale a row of images to fit a div properly?

柔情痞子 提交于 2021-02-05 08:35:38
问题 I have a fixed-height interface I'm styling with CSS. I want it to be responsive to browser height (and, eventually, width... but one problem at a time) and I have a fiddle in which the interface operates almost exactly as I'd like it to with respect to browser height... with one exception. I use a flexbox layout with object-fit: scale-down to force the row of images in the green div to shrink when their containing div is not tall enough to fit the images at native dimensions. This results in

How to make sticky footer with FlexBox and react

心不动则不痛 提交于 2021-02-05 08:26:50
问题 I'm using a react-native router with Flexbox. I would like to show FlatList taking the full screen and sticky footer in the end. I tried to specify flexGrow: 1 for FlatList, and flexShrink: 0 for View footer, but it doesn't work. I'm building the app in Expo and check result on iPhone. import React, {Component} from 'react'; import { Text, View, FlatList, } from 'react-native' import {Provider} from 'react-redux' import {NativeRouter, Route, Link} from 'react-router-native' export default

Flex items are shrinking below flex-basis

我的未来我决定 提交于 2021-02-05 06:40:26
问题 I've been reading stack overflow questions and other blogs on what flex-basis is supposed to do, but I still can't fully grasp how it affects the behaviour of an element. Here's an example with my code: .item { background-color: red; border: 1px solid pink; margin: 10px; padding: 10px; } .container { display: flex; } .container .item { height: 50px; flex-grow: 1; } .container3 { flex-direction: row; width: 500px; } .container3 .a, .container3 .b { flex-basis: 200px; } <div class="container

Flexbox children shrink up to a certain point (but don't expand if they don't need to)

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-05 02:18:02
问题 I'm a having a bit of an issue here. I have a flexbox container with children of different sizes. Based on quantity and their content children might overflow the parent. What I want is the children to shrink so they try to fit in the parent container. I did that by adding shrink and overflow properties to the children. So far so good. .container > div { background-color: orange; padding: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; } I end up with

Flexbox children shrink up to a certain point (but don't expand if they don't need to)

别说谁变了你拦得住时间么 提交于 2021-02-05 02:17:05
问题 I'm a having a bit of an issue here. I have a flexbox container with children of different sizes. Based on quantity and their content children might overflow the parent. What I want is the children to shrink so they try to fit in the parent container. I did that by adding shrink and overflow properties to the children. So far so good. .container > div { background-color: orange; padding: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; } I end up with

Flex items not wrapping

我们两清 提交于 2021-02-04 21:14:45
问题 My issue is that I have a section within the article that I made a flexbox, and when I reduce the size of the browser those 3 elements in that flexbox will overlap. Any tips? body { display: flex; flex-direction: column; } header { background: blue; } main { display: flex; flex-direction: row; flex: auto; } article { flex: 2; overflow-y: auto; background: red; } aside { flex: 1; overflow-y: auto; background: green; } .test { display: flex; flex-direction: row; flex: auto; align-items: stretch

Responsive design: centralize a full-screen square in any screen size

柔情痞子 提交于 2021-02-04 17:48:40
问题 The problem is simple: The main part of my page is a square that should be shown at the center of the screen in all screen sizes and orientations The square should use the screen efficiently and be as big as possible without the need to scroll No scrollbars, no fixed sizing, no overflow-hidden, no Javascript. Flexbox is encouraged. This is how the page should look like in a landscape or portrait browser: Here is a CodePen as a starting point. <div class="body"> <div class="square"> Square <