flexbox

Bootstrap 4 align bottom [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-12-26 15:19:18
问题 This question already has answers here : In CSS Flexbox, why are there no “justify-items” and “justify-self” properties? (4 answers) Closed last year . I have a full-page bootstrap layout, and on the first page I need something aligned to middle & bottom. There is a background image (first div), and a darker layer on it (second div). <div class="h-100 w-100"> <div class="h-100 w-100 text-center"> <div class="h-100 w-100 d-flex align-items-center"> <div class="col-xs-12 col-sm-12 col-md-12 col

Bootstrap 4 align bottom [duplicate]

↘锁芯ラ 提交于 2019-12-26 15:15:10
问题 This question already has answers here : In CSS Flexbox, why are there no “justify-items” and “justify-self” properties? (4 answers) Closed last year . I have a full-page bootstrap layout, and on the first page I need something aligned to middle & bottom. There is a background image (first div), and a darker layer on it (second div). <div class="h-100 w-100"> <div class="h-100 w-100 text-center"> <div class="h-100 w-100 d-flex align-items-center"> <div class="col-xs-12 col-sm-12 col-md-12 col

Make item on CSS grid a hyperlink

*爱你&永不变心* 提交于 2019-12-26 02:56:22
问题 I am working with the CSS grid. I thought that I could make one single grid item to a hyperlink, if I wrapped it in an a tag. But I can see that this solution is not working. The whole grid consist of around 30 grid elements made with the CSS grid. Building the grid up with flex boxes is therefore not a good solution. Does anybody have an idea on how I can turn the whole grid column into a hyperlink? .item2 { grid-row: 1 / 1; grid-column: 7/13; height: 340px; display: flex; justify-content:

make variable number of divs positioned side by side of equal height with HTML/CSS (responsive design)?

偶尔善良 提交于 2019-12-25 19:07:51
问题 Browser support: I need this to work with IE8+. CSS3 + polyfill solution accepted, but CSS only solution even better. I have a series of divs positioned side-by-side. I want their height to be equal to the heighest div in the "row". The key here is that the number of divs next to another varies (from 4 by row to 3 by row). This is because this is a responsive design, in which we set the width of a product to 25% by default, but 33% when in smaller screen size. See the code below, and the

How to fit sizes of background and foreground layer using CSS flexbox

╄→尐↘猪︶ㄣ 提交于 2019-12-25 18:59:18
问题 In my web app, I have a background and an overlay layer, both can grow, and if one of them grows, the other should grow to the same size. In other words: I have a stack of HTML elements, and their sizes should be in sync, following the biggest element. Is there a way to do this with a plain flex layout? ( without float and transform hacks) Here's some pseudo code to outline my problem: <container> <background>has min-height of container height. Can grow (and cause scrollbars) if dynamic

Right align out the Float Property

杀马特。学长 韩版系。学妹 提交于 2019-12-25 18:17:37
问题 .header { display: flex } .logo, .contribute, .class 1, .class 2 { display: inline-block; margin: auto 0; } <header class="header"> <div class="logo"> </div> <nav </nav> <div class="contribute"> </div> <div class="class 1"> </div> <div class="class 2"> </div> </header> In this suppose .header has display: flex; set. .logo , .contributor , .class 1 , .class 2 has display: inline-block; set and are child to parent .header class, which is flex. How can we make sure that the .class 1 and .class 2

Equal distance between Div's using Angular 5 and Flex Layout

折月煮酒 提交于 2019-12-25 14:41:43
问题 I am currently using Angular 5 that runs a loop and displays several containers as a list (Thousands of results). <div class="temp-list"> <div> <ng-container #activityCards *ngFor="let activity of (activityCollection.activities | filters: filtersObject); let i = index;"> <div class="activity-card-container" *ngIf="checkIsVisible(i)" [ngClass.gt-md]="{'display-inline': true, 'large-activity': i < 3, 'medium-activity': i > 2 && i < 7, 'small-activity': i > 6 }" > <activity-card [activity]=

Equal distance between Div's using Angular 5 and Flex Layout

断了今生、忘了曾经 提交于 2019-12-25 14:41:11
问题 I am currently using Angular 5 that runs a loop and displays several containers as a list (Thousands of results). <div class="temp-list"> <div> <ng-container #activityCards *ngFor="let activity of (activityCollection.activities | filters: filtersObject); let i = index;"> <div class="activity-card-container" *ngIf="checkIsVisible(i)" [ngClass.gt-md]="{'display-inline': true, 'large-activity': i < 3, 'medium-activity': i > 2 && i < 7, 'small-activity': i > 6 }" > <activity-card [activity]=

CSS display: flex, align-center and button with checkboxes

泄露秘密 提交于 2019-12-25 13:06:26
问题 There is a flex box with buttons and a label inside. Apparently align-items property does not align buttons. How can I achieve that? https://jsfiddle.net/elaman/4uyggo7s/ <div class="wrapper"> <div> <button>Test</button> </div> <div> <input type="checkbox" id="test" /> <label for="test">Test</label> </div> <div> <button>Test</button> </div> <div> <button>Test</button> </div> </div> CSS .wrapper { display: flex; } .wrapper > * { align-items: baseline; } .wrapper > :first-child { flex: 1 0 auto

How can I “pin” one node to left viewport edge, while keeping other node horizontally centered relative to viewport?

拈花ヽ惹草 提交于 2019-12-25 09:25:23
问题 How can I pin Menu to the left edge of the viewport, while keeping My Awesome Site horizontally centered (relative to the viewport)? align-items: center and justify-content: center are just starting points... I don't know if I need to use a combination of other Flexbox rules. Requirements: Use Flexbox. Don't add any more HTML. Keep the CSS as clean as possible. Notes: align-items: center and justify-content: center are just guesses... I'm cool with other Flexbox combinations. header { display