Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Browsing all 1305 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Issue with CSS for overflow for dropdown

I have created this dummy top nav bar, where i have multiple drop-down which can be scrollable on x axis via buttons if multiple . But when i open the dropdown it is being opened in scroll view for y...

View Article


align long text in flex box same way as short text

how can I let flex box stay same when it has long text or short texthtml<div class="a"><div class="b" style="background-color:red"></div><div class="b"...

View Article


How to allow resize of img with flexbox within a div

This is likely a duplicate question but I couldn't find any useful tips for my case.Here, I want an <img> element to resize its width and height in a flexbox contained in a <div>....

View Article

Image may be NSFW.
Clik here to view.

Vertical scroll on sub flex element to match the height adjacent element...

I have the following snippet with 2 divs in a flex container. The 1st one has 2 sub divs with a fix size (to mock content), the second one has only 1 mock content. Currently the height of the container...

View Article

How to constrain image to available space in a flexbox

I am trying to get up to speed on using the Flexbox.What I want to do is have a navigation panel on the left and a dynamic area on the right.There is an issue with the dynamic area. The image does not...

View Article


Flexbox width calculation when wrapping children [duplicate]

I have a flexbox with a varying amount of children. All children have the same size (i.e., 96px). The flexbox has wrapping enabled.When all children fit in the same row, the flexbox's reported width is...

View Article

Add a "hamburger" expand/collapse to a complex div menu [closed]

I have a complex split menu created with div's. I have the design for the most part sorted out. When you shrink the page in the code pen you can see there is a media query and the navigation top bar...

View Article

Align-content property is working on a single line

I am learning Flex Box and I have troubles with the property align-content. The property shouldn't have result when there is a single line, but in my case it does and I can't understand why.The result...

View Article


Fixing line-height or gap issues with flex container and artificial line break

I am using a flex container and an artificial line break to break words when desired. I never realized that it was causing extra gap space between lines.As you can see in the example, the space between...

View Article


How to make a Flexbox element fill the remaining vertical space? [duplicate]

I want #item-3 to fill the remaining vertical space.I cannot modify #root, #item-1, or #item-2. Only #item-3 can be changed.For performance reasons, I would like to solve this problem using only CSS...

View Article

Image may be NSFW.
Clik here to view.

Why is flexbox behaving differently in chrome vs firefox?

I have a div with two elements, an image and text inside a flexbox. I try to maintain the ratio between the two using flex: 1 and flex: 2. (one third for the image, two this for the text).It looks like...

View Article

How can I dynamically adjust a CSS grid layout for a memory game with a...

I'm building a memory game and want to dynamically adjust the CSS grid layout to accommodate a variable number of cards. The challenge is to ensure that the card size remains consistent regardless of...

View Article

CSS problem with display flex and display block

I have a class with the property display: flex. When I go to Chrome dev tools, it shows display: block, because of user-agent style sheet:div { display: block; }It seems I can't override it, even with...

View Article


Why is flex-wrap causing gaps in cross axis when set to wrap?

So I have been learning CSS as a beginner . Recently I was exploring flex-box. My original knowledge of flex-wrap : wrap; is that if overflow occurs along the main axis (flex-direction) it prevents it...

View Article

How to make fixed-width CSS Grid items occupy the full width of the parent...

I want grid items with a fixed width to span the full width of their parent container, leaving equal spacing between them. In Flexbox, this could be achieved using justify-content: space-between. How...

View Article


Issue with layout, vertical scrolling on body element and a table with...

I have overflow-yauto on body and a content which contains a table. There is a div that contains the table and it has overflow-xauto for horizontal scrolling in table view. The table has a thead with...

View Article

While Stying Flex-1 doesn't work while working with React Native on an...

My code: -<View className="flex-row items-center space-x-2 pb-2 mx-4"><View className="flex-row space-x-2 bg-gray-200 p-3 flex-1"><SearchIcon color="gray" size={20} /><TextInput...

View Article


Image may be NSFW.
Clik here to view.

How to make items with fixed width occupy the full width of the parent...

I want grid items with a fixed width to span the full width of their parent container, leaving equal spacing between them. How can I achieve a similar layout using CSS Grid or Flexbox?Here’s the...

View Article

Image may be NSFW.
Clik here to view.

React native text going off my screen, refusing to wrap. What to do?

The following code can be found in this live exampleI've got the following react native element:'use strict';var React = require('react-native');var { AppRegistry, StyleSheet, Text, View,} = React;var...

View Article

Flexbox with multiline text ellipsis

I've been using the white-space: no-wrap, text-overflow: ellipsis, and overflow: hidden CSS properties to create ellipsis truncation for multiline text. However, this doesn't work when using...

View Article
Browsing all 1305 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>