How to make 4 items per row in left and 4 in right

flexbox max two items per row
flexbox 2 columns per row
flexbox left and right
get flex items to wrap
bootstrap max items per row
flex; align right
flex-wrap space between rows
flexbox cheat sheet

I want to achieve the below. I tried this code but still can't achieve this. Please see attached images. 4 images; 2 in left with text next to it... and another 2 images in right with text next to it. Exactly as it is in the attached images.

.thumbnailLeftSmallIconBottom {
  float: left;
  /*width:50%;*/
  padding: 5px;
  /*clear: both;*/
  /*display:inline-block;*/
}

.thumbnailRightSmallIcon {
  float: right;
  width: 50%;
}

.thumbnailSmallImageAll::after {
  content: "";
  display: table;
  clear: both;
}
<div class="thumbnailLeftSmallIcon1">
  <div class="thumbnailLeftSmallIconTop">
    <img class="thumbnailSmallImage" src="~/Content/images/house_50px.png" alt="Image">
  </div>
  <div class="thumbnailLeftSmallIconTop">
    <span> @Html.DisplayFor(modelItem => house) </span>
  </div>

  <div class="thumbnailLeftSmallIconBottom">
    <img class="thumbnailSmallImage" src="~/Content/images/bedroom_80px.png" alt="Image">
  </div>
  <div class="thumbnailLeftSmallIconBottom">
    <span> @Html.DisplayFor(modelItem => bedroom) </span>
  </div>

try the table:

<table>
    <tr>
        <td>
            <div class="thumbnailLeftSmallIconTop">
                <img class="thumbnailSmallImage" src="~/Content/images/house_50px.png" alt="Image">
                <span> @Html.DisplayFor(modelItem => house) </span>
            </div>
        </td>
        <td>
            <div class="thumbnailLeftSmallIconBottom">
                <img class="thumbnailSmallImage" src="~/Content/images/bedroom_80px.png" alt="Image">
                <span> @Html.DisplayFor(modelItem => bedroom) </span>
            </div>
        </td>
    </tr>
    <tr>
        <td>
            <div class="thumbnailLeftSmallIconTop">
                <img class="thumbnailSmallImage" src="~/Content/images/house_50px.png" alt="Image">
                <span> @Html.DisplayFor(modelItem => house) </span>
            </div>
        </td>
        <td>
            <div class="thumbnailLeftSmallIconBottom">
                <img class="thumbnailSmallImage" src="~/Content/images/bedroom_80px.png" alt="Image">
                <span> @Html.DisplayFor(modelItem => bedroom) </span>
            </div>
        </td>
    </tr>
</table>

tr means row td means cell

Flexbox: 4 items per row, More specifically, there are eight flex items in your container. I personally would use percentages on the margin-left if you want to have it always 4 per row. Let's use 21% for width, and the remainder 4% for left & right margins .child  Definition and Usage. The grid-row property specifies a grid item's size and location in a grid layout, and is a shorthand property for the following properties::. grid-row-start


I made a flex-based fiddle that you can mimic with your classes and uses valid, up-to-date CSS instead of the float that were used years ago.

HTML:

<div class="container">
  <div class="left">
    <div class="image-container">
      <img class="thumb" src="~/Content/images/house_50px.png" alt="Image">
    </div>
    <div class="text">
      <span> @Html.DisplayFor(modelItem => house) </span>
    </div>
  </div>
  <div class="right">
    <div class="image-container">
      <img class="thumb" src="~/Content/images/bedroom_80px.png" alt="Image">
    </div>
    <div class="text">
      <span> @Html.DisplayFor(modelItem => bedroom) </span>
    </div>
  </div>
</div>

CSS:

.container {
  display: flex;
  flex-direction: row;
}

.left, .right {
  display: flex;
  flex-direction: column;
  width: 40vw;
  background-color: yellowgreen;
  margin-right: 5vw;
}

https://jsfiddle.net/tamok48e/

Note: the background and width were added only for clarity purposes but can safely be removed in your final code.

Adjusting the number of blog items per row, for tablets, in a Brine , If you have your blog pages on Brine set to 3 or more items per row in desktop, a row except for the last one), and then divided by the number of elements per row. However, feel free to set margin-right and margin-top separately if you prefer! Then, all that's left to do is to set this thing to display: none. Flexbox was designed as a single dimensional layout, meaning that it deals with laying out items as a row or as a column — but not both at once. There is however the ability to wrap flex items onto new lines, creating new rows if flex-direction is row and new columns if flex-direction is column. In this guide I will explain how this works, what it is designed for and what situations really


This layout is pretty simple to achieve with Flexbox or Grid too. As the image and text are together, you can put them inside one div so that will become 1 item and all the 4 items can be wrapped inside one parent container. Now there are multiple ways to achieve this. I've created 2 examples for you on CodePen. One way is to let the items flow inside a Flex container (parent) and give the parent a width or max-width, then items will come one after the other. Another way is to have two child items inside the parent Flex which you can imagine as columns, and your content goes inside of those two columns. Be careful with giving fixed widths, especially if you want to make it responsive.

example 1 : https://codepen.io/gzaman/pen/ExxWGgy?editors=1100

.container {
  display: flex;
  background: pink;
  max-width: 460px;
  flex-wrap: wrap;
  justify-content: center;
}

.flexitem {
  margin: 4px;
  padding: 8px;
  background: salmon;
  width: 200px;
  display: flex;
  align-items: center;
}

.thumbnailSmallImage {
  height: 20px;
}
<div class="container">
  <div class="flexitem">
    <div class="thumbnailLeftSmallIconTop">
      <img class="thumbnailSmallImage" src="https://images.unsplash.com/photo-1571841767325-588e9a138f73?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1189&q=80" alt="Image">
    </div>
    <div class="thumbnailLeftSmallIconTop">
      <span>Text in span 1</span>
    </div>
  </div>
  <div class='flexitem'>
    <div class="thumbnailLeftSmallIconBottom">
      <img class="thumbnailSmallImage" src="https://images.unsplash.com/photo-1571841767325-588e9a138f73?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1189&q=80" alt="Image">
    </div>
    <div class="thumbnailLeftSmallIconBottom">
      <span>Text in span 2</span>
    </div>
  </div>
  <div class='flexitem'>
    <div class="thumbnailLeftSmallIconBottom">
      <img class="thumbnailSmallImage" src="https://images.unsplash.com/photo-1571841767325-588e9a138f73?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1189&q=80" alt="Image">
    </div>
    <div class="thumbnailLeftSmallIconBottom">
      <span>Text in span 3</span>
    </div>
  </div>
  <div class='flexitem'>
    <div class="thumbnailLeftSmallIconBottom">
      <img class="thumbnailSmallImage" src="https://images.unsplash.com/photo-1571841767325-588e9a138f73?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1189&q=80" alt="Image">
    </div>
    <div class="thumbnailLeftSmallIconBottom">
      <span>Text in span 4</span>
    </div>
  </div>
</div>

Special Edition Using Java 2, For example, a label can be used to identify a text field as a place to enter a makes it possible to create generic labels that identify any kind of component. for aligning a label's text against the left-hand side, center, or right-hand side of Instead, it displays items in a certain number of onscreen rows (one item per row)​. To position these three <section> elements in a three-column row, instead of floating one column to the left and one column to the right, we’ll float all three <section> elements to the left. We’ll also need to adjust the width of the <section> elements to account for the additional columns and to get them to sit one next to the other.


Co-operative Manager and Farmer, E. TION APPLIED TO DISE Items per Elevator. Top 1 ow left to right: Middle row left to right: Bottom row left to right: Frank B. Bell. for them, and that their market did not suffer any by making a really creditable display at the convention. The difference is that we use different columns for each image and different column sizes for each screen size (smartphones, tablets, desktops) to make it responsive. Read the Bootstrap grid documentation here to learn more or just to refresh your memory.


Mastering CSS Layout with Flexbox, Create a flex container; Put flex items in a row; Put flex items into a column; Move to the left; Move flex items to the right; Center everything; Grow a flex item X gives you options for distributing the space around wrapped rows or columns. Select the cells, columns, or rows, with text that you want to align (or select your entire table). Go to the (Table Tools) Layout tab. Click an Align button (you may have to click the Alignment button first, depending on the size of your screen).


Items per Row, For example, 4 products per row will apply 25% width on each item, 3 per row will It's recommended to create and use variables if the same items per row will  Just variable width children, last row should be left-aligned while previous rows should stretch to fill full size. – tao Jun 28 '17 at 14:59 | show 1 more comment 4