flexbox

Why can I not flexbox certain elements in ReactJS?

最后都变了- 提交于 2021-02-20 04:29:08
问题 I started out trying to style <Link> elements from react-router . <Link style={{display: 'flex'}}>...</Link> but it seems like it strips the display CSS property specifically. Does anyone know why and how to fix it? I get the same problems with <a style={{display: 'flex', marginTop: '10px'}}>Test link</a> (Result: Only margin-top: 10px is applied) EDIT: For future reference, as I see this page still gets some views: I really tried using multiple vendor-specific display CSS attributes, and not

Why don't flex items shrink past content size?

余生长醉 提交于 2021-02-19 07:39:13
问题 I have 4 flexbox columns and everything works fine, but when I add some text to a column and set it to a big font size, it is making the column wider than it should be due to the flex property. I tried to use word-break: break-word and it helped, but still when I resize the column to a very small width, letters in the text are broken into multiple lines (one letter per line), and yet the column does not get smaller width than one letter size. Watch this video (at the start, the first column

Why don't flex items shrink past content size?

倖福魔咒の 提交于 2021-02-19 07:39:06
问题 I have 4 flexbox columns and everything works fine, but when I add some text to a column and set it to a big font size, it is making the column wider than it should be due to the flex property. I tried to use word-break: break-word and it helped, but still when I resize the column to a very small width, letters in the text are broken into multiple lines (one letter per line), and yet the column does not get smaller width than one letter size. Watch this video (at the start, the first column

How can I vertically center rotated text using Flexbox layout?

独自空忆成欢 提交于 2021-02-19 05:05:21
问题 How can I vertically center rotated text using flexbox layout? I want something that looks like this: Here's what I have so far: html, body { height: 100%; } body { background-color: #efefef; } body > div { align-content: center; background-color: white; border: 1px solid black; display: flex; height: 100%; width: 25px; } body > div > div { flex: 1; transform: rotate(-90deg); } <div> <div> Where did I go? </div> </div> 回答1: Add white-space: nowrap and center horizontally and vertically using:

How can I vertically center rotated text using Flexbox layout?

我是研究僧i 提交于 2021-02-19 05:05:09
问题 How can I vertically center rotated text using flexbox layout? I want something that looks like this: Here's what I have so far: html, body { height: 100%; } body { background-color: #efefef; } body > div { align-content: center; background-color: white; border: 1px solid black; display: flex; height: 100%; width: 25px; } body > div > div { flex: 1; transform: rotate(-90deg); } <div> <div> Where did I go? </div> </div> 回答1: Add white-space: nowrap and center horizontally and vertically using:

Horizontally and vertically center bootstrap 4 columns in consecutive rows

流过昼夜 提交于 2021-02-19 03:48:18
问题 I'm trying to simply center justify and align two bootstrap columns inside a container. The columns are in different rows. The grid layout is <body style="height: 100vh;"> <div class="container"> <div class="row"> <div class="col-6"> <div class="card"> hello </div> </div> </div> <div class="row"> <div class="col-4"> <div class="card"> world </div> </div> </div> </div> </body> the cards are just to outline the containers. I'm aware there are MANY questions on vertical alignment, and I may have

Flexbox wkhtmltopdf Rendering Issue

自作多情 提交于 2021-02-19 02:52:10
问题 I have a page that I am turning into a pdf with wkhtmltopdf. I have a 3 column layout and it works well in Chrome but the pdf is incorrectly generated. Is there an alternative to flexbox that would give the same view or a way to make flexbox work in wkhtmltopdf? Modernizr did not help. Thanks. HTML: <div class="header"> <div id="name" class="center"> <h2> Centered Text </h2> </div> <div id="links" class="left"> <h3> Left Line 1 <br> Left Line 2 </h3> </div> <div id="contact" class="right">

flexbox column wrap list without overlapping items

≡放荡痞女 提交于 2021-02-17 03:22:46
问题 I have a list that I'd like to wrap to show on a pop-up modal which has a maximum width of 540px. Typically, it looks like this: But if too many names are added, then it'll overlap like this: My goal is to prevent the names from overlapping either by hiding the overflow (only show the maximum possible columns based on the data), or by making it scrollable. How can I wrap the list to take up the horizontal and vertical space (as showed below) but prevent the items from overlapping when the

Center and right align flexbox elements with text-oveflow and taking empty space on left side

纵饮孤独 提交于 2021-02-16 22:45:58
问题 @michael-benjamin Center and right align flexbox elements almost what I want, but with 2 differences: Div have to take empty space at left side too (when it be wide) Div have to collapse text when there is no empty space around at all. What I have? A is main centered object and BBBBBBBBBBBBBBB is right object. This is fine till A will grow: What I want? Is it possible to do with flex/grid/table-tr-td/any other css tricks? What I tried? CSS Positioning Properties - can't stop when grow to B

Center and right align flexbox elements with text-oveflow and taking empty space on left side

丶灬走出姿态 提交于 2021-02-16 22:45:34
问题 @michael-benjamin Center and right align flexbox elements almost what I want, but with 2 differences: Div have to take empty space at left side too (when it be wide) Div have to collapse text when there is no empty space around at all. What I have? A is main centered object and BBBBBBBBBBBBBBB is right object. This is fine till A will grow: What I want? Is it possible to do with flex/grid/table-tr-td/any other css tricks? What I tried? CSS Positioning Properties - can't stop when grow to B