how to force list items to go to differents rows?

css flex
two column ordered list css
css ul> <li two rows
flexbox force new row
flexbox 2 columns per row
css multi column list
css columns
responsive multi column list

I want to use this

the problem is thjat the list items are on the same rows. how can i put each item on the following row to make a vertical list with image at the beginning of each row ?

<ul id="services-list">
  <li>
    <a href="https://www.google.com" class="image"></a>
    <div class="content">
      <h3>Header</h3>
      <p>text goes here</p>
    </div>
  </li> 
  <li>
    <a href="https://www.google.com" class="image"></a>
    <div class="content">
      <h3>Header</h3>
      <p>text goes here</p>
    </div>
  </li>
</ul>

css:

/*a little bit of reset*/
#services-list, #services-list p, #services-list h3 {
  list-style: none;
  margin:0; padding:0;
}    
#services-list > li {
  float:left;
  margin-right: 20px;
  width: 130px;
}    
#services-list > li > .image {
  display:block;
  float:left;
  margin-right:10px;
}

/*
this instructions are to force the dimensions of image and its container <a>
*/
#services-list > li > .image,
#services-list > li > .image > img {
  width:24px; height:24px;
}

Just remove float left from the below css, and you're done...

#services-list > li{
  float: none;
}

CSS Swag: Multi-Column Lists – A List Apart, If you want to present a list in multiple columns, you'll have to compromise. most of these lists are going to break if we assume that each list item will occupy one This keeps each list item on a row by itself for the benefit of human readers and at the As we've seen, splitting a list into sub-lists and forcing consecutive item  If flex-direction is set to row-reverse then the items will start from the end edge of the container and lay themselves out in reverse ordered lines. Note that the reversing is only happening in the inline, row direction. We start on the right then go onto the second line and again start from the right.

The example is floating the lists so that it goes side by side using CSS.

<style>
    li { float: left; list-style: none; }
</style>

Breaking to a new row with flexbox, There's no property that we can set on a flex item to make it break to a new row, but Inserting this collapsed row between two flex items will make * the flex item that If we then want to add another row of items below that row: technique comes with some unique characteristics that may come in handy. Forcing inline-block Elements On One Line. To get all elements to appear on one line the easiest way is to: Set white-space property to nowrap on a parent element that has overflow-x: auto set to show horizontal scrollbars. Have display: inline-block set on all child elements.

You can also add width as 100% to li items

#services-list > li {
    width: 100%;
}

Mastering Wrapping of Flex Items, If flex-direction is set to row-reverse then the items will start from the end We start on the right then go onto the second line and again start from the right. This is the difference between one and two-dimensional layout. Note: For the purpose of this article the list name is set to ‘ListItems’ Creating the drop-down cell. Switch back to the worksheet where the form is beign creating; Select the cell that will be holding the drop-down list; From the Data menu click the ‘Data Validation’ button (see Figure 4). This will open the window shown in Figure 5.

For your code this works:

li{
  list-style: none !important;
  float: left !important;
  width: 100% !important;
}

see here https://codepen.io/agamj474/pen/zJmrde

Auto-placement in CSS Grid Layout, In addition to the ability to place items accurately onto a created grid, the You can see how those items are placed and the other items then auto-place in the spaces. it will move to the next row until it finds a space the item can fit in. grid-auto-flow: dense; list-style: none; margin: 1em auto; padding: 0;  But there is a limitation: the flex container can only have a ::before and a ::after pseudo-element. That means you can only force 2 line breaks. To solve that, you can generate the pseudo-elements inside the flex items instead of in the flex container. This way you won't be limited to 2.

flex-wrap, The blue list is set to wrap-reverse. Note: the flex-direction is set to the default value: row . #Related Properties. Then in the popped out Custom Lists dialog, click NEW LIST from the Custom lists: box, and enter the custom list values that you need to sort with this order into the List entries: box, at last, click Add button to add the new lists to the Custom Lists box. 3. And then click OK > OK to close the dialogs.

Centering List Items Horizontally (Slightly Trickier Than You Might , Make the list items inline instead of the default block. .li { display: inline; } This will not force breaks after the list items and they will line up horizontally as far as  A client wanted to display some quicklinks in the promoted links tiles. We had 8 links, on a page with 2 columns. By default you cannot add rows in the webpart. There are some tutorials out there, that need you to add dozens of lines ofjQuery, javascript or other forms of script. A much easier way to do this was given on StackExchange: just

Multiple column lists using one <ul> – CSS Wizardry – Web , The trick here is to force the list to break at the right point. If you want two columns​, you need to float the list items left and set them at 50% the list items will only ever fit two side-by-side, then begin again on the row beneath. Select the data and go to the Insert tab and press the PivotTable command. In the Create PivotTable dialog box, make sure to check the Add this data to the Data Model box. This will allow us to create measures using the DAX fomula language within out pivot tables.

Comments
  • above link is not open please improve it
  • The full content of your question must be in your question, not just linked. Links rot, making the question and its answers useless to people in the future, and people shouldn't have to go off-site to help you. Put a Minimal, Complete, and Verifiable example in the question, ideally using Stack Snippets (the &lt;&gt; toolbar button) to make it runnable (here's how to create one).
  • if you removed float: left from the lis it would be vertical