logo
Tags down

shadow

Convert six column flex layout into three columns


By : user2176335
Date : October 14 2020, 02:21 PM
To fix this issue You actually don't wana use column at all. Just tell the ul to wrap with flex-wrap:wrap; and make the width of the li tag take up the percentage of the available columns you want. For example if you want 3 columns you use 33.33% width on the li if you want 2 columns you use 50%.
Additionally you have to remove the border from the li tag and put it on the inner div so it doesn't mess with the 33.33% width value.
code :
.list_item-container {
  display: flex;
  flex-direction: column;
  border: 1px solid #000;
  padding: 0px 20px;
}

@media (max-width: 992px) {
  .list-items-ul {
    flex-wrap: wrap;
  }
  .list-items-ul li { width: 33.33%;}
}
.list-items-ul {
  list-style-type: none;
  display: flex;
  flex-direction: row;
}

.list_item-container {
  display: flex;
  flex-direction: column;
  border: 1px solid #000;
  padding: 0px 20px;
}

@media (max-width: 992px) {
  .list-items-ul {
    flex-wrap: wrap;
  }
  .list-items-ul li { width: 33.33%;}
}
<ul class="list-items-ul">
  <li>
    <div class="list_item-container">
      <span>Col 1</span>
    </div>
  </li>
  <li>
    <div class="list_item-container">
      <span>Col 2</span>
    </div>
  </li>
  <li>
    <div class="list_item-container">
      <span>Col 3</span>
    </div>
  </li>
  <li>
    <div class="list_item-container">
      <span>Col 4</span>
    </div>
  </li>
  <li>
    <div class="list_item-container">
      <span>Col 5</span>
    </div>
  </li>
  <li>
    <div class="list_item-container">
      <span>Col 6</span>
    </div>
  </li>
</ul>


Share : facebook icon twitter icon

Convert multiple columns html table to a single column for Mobile friendly layout


By : John Chernoff
Date : March 29 2020, 07:55 AM
it should still fix some issue One way you can achieve this is by using JQuery wrap method. See Wrap and UnWrap
Demo
code :
 $(document).ready(function () {
    var tbl = $("table");
      $('td','table').unwrap().each(
     function () {     
          tbl.append($(this).wrap('<tr>').parent()); 
    });
  });
 $(document).ready(function () {
    $('table').find('td').unwrap().wrap($('<tr/>'));
});

Angular Material layout nested flex rows inside of flex columns do not divide space as expected


By : Vishesh Jindal
Date : March 29 2020, 07:55 AM
hope this fix your issue Chrome doesn't calculate vertical percentages very well in Flexbox. So remove the following and let the default align-self: stretch do its magic.
code :
.layout-fill {
  height: 100%; /* Remove this and use `auto` instead */
}
.layout-column > .flex    { flex: 65; }
.layout-column > .flex-15 { flex: 15; }
.layout-column > .flex-20 { flex: 20; }

Flex Layout - Text wrapping issue with 2 column layout


By : Dario
Date : March 29 2020, 07:55 AM
wish helps you Using flex-shrink: 0 on child will prevent it from splitting.
More about flex-shrink.
code :
.parent {
  display: flex;
  width: 100%;
  align-items: flex-start;
}
.child {
    flex-shrink: 0;
}
<div class='parent'>
  <div class='child'>
    <span class='child-l'>Child</span>
    <span class='child-r'>2</span>
  </div>
  
  <div class='content'>
    These are multiple lines of content that expand into 2 lines and breaks the UI.
  </div>
</div>

Parent div is flex, children divs are columns with flex:1. How to push the content of the right column to the right side


By : user2661921
Date : March 29 2020, 07:55 AM
should help you out If you want your last column to collapse, you can reset the flex-grow value to 0 with the last-of-type pseudo-class.
code :
.row {
    display: flex;
}
.column {
    flex: 1;
}
.column:last-of-type {
    flex: 0;
}
.slideshow-photos {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mySlides {
    width: 100px;
    height: 100px;
}
<div class='row'>
    <div class='column'>
        <p>HELLO</p>
    </div>
    <div class='column'>
        <div class="photos-container">
            <div class="mySlides">
                <img class='slideshow-photos' src="https://www.animalfriends.co.uk/app/uploads/2014/08/06110347/Kitten-small.jpg">
            </div>
        </div<
    </div>
</div>

Angular Flex Layout: Responsive layout combining row and column


By : ไม่รัก ก็คิดถึง
Date : March 29 2020, 07:55 AM
around this issue I would minimize your code by looping over the array of items. And I changed the transition from md to sm instead of going to straight to xs, but its your preference. I am subtracting layout gap as well (-0.5%).
code :
<div class="container" fxLayout="row" fxLayout.sm="column" fxLayoutWrap fxLayoutGap="0.5%" fxLayoutAlign="center">
 <ng-container *ngFor="let item of items">
    <li
      fxFlex="0 1 calc(25% - 0.5%)"
      fxFlex.lt-md="0 1 calc(50% - 0.5%)"
      fxFlex.lt-sm="100%">
   </li>
</ng-container>
   </div>
Related Posts Related Posts :
  • Overflow: content on left side is hiding on overflow is set to auto
  • Loop over Observable
  • Laravel controller doesn´t process my view parameters
  • put margin on border - css
  • Form table inputs doesn't get aligned in HTML
  • Using flex to achieve two rows and one column layout
  • How to make <textarea> take the size of text
  • Make nested table with table-layout auto, width 100% overflow when window too small
  • Fully cover one div with another div of the same size
  • 16bit canvas with WebGL 1
  • "Elements should not have tabindex greater than zero" - Nonzero Tabindex Breaks Validation & 508 Complianc
  • Dynamic form using *ngFor and submitting values from it
  • Why does Firefox not use CSS from an local absolute path?
  • Bootstrap 4 Card Component Remove unnecessary whitespace
  • Link takes double click to activate- how to make it only one? Angular 5
  • How to center a DIV in the remaining space on RHS of another DIV
  • Yii2 Remove container div specific to every record from listview
  • Charm bar doesn't scroll to bottom
  • Sticky footer is hiding content at the bottom of my website
  • Why I am getting GET vars in a POST form?
  • How do I make the "after" pseudo-element always be on the same line in my table headers?
  • Bootstrap 4 Order div columns
  • Auto-width image with `srcset` attribute
  • How to make the image also have rounded corners?
  • Scrape table for nested table in local html using selenium
  • Fixed side chat menu using flex box
  • Select all siblings if one of them has a specific class
  • HLS / Media Source Extensions <video> with muted & autoplay freezes on first frame on mobiles
  • HTML element doesnt contain all page contents
  • XPath to find elements
  • Target only the first direct child not working despite :nth-child(1)
  • Why nuxt insert all css link into every page with extractCss true
  • User agent stylesheet is overriding my css even though it acknowledges it shouldn't?
  • Basic tags in html clarification
  • CSS Lifted Corners in Foundation 6
  • How to make CSS clip path only reside on top of div?
  • Allow page breaks inside tr and td elements
  • Creating a dropdown menu purely with HTML + CSS
  • How to add vertical space between inputs in a form?
  • Submit button does not pass form data
  • Why a row is stacked in column
  • Button style differs on different screens and devices
  • Text on Left, Icon on Right - Bootstrap
  • Grid is not flexible enough to sort the posts
  • CSS — How to blur a SVG mask?
  • Disable the growing ability of an element
  • Line up text over multiple lines under each other?
  • CSS3 Grid fill space in last row
  • ngModel with select list
  • Spring boot Requested mapping value variable
  • shadow
    Privacy Policy - Terms - Contact Us © voile276.org