Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1307

How to display 3 items per row in flexbox?

$
0
0

I have a list and I want to display my li elements horizontally and 3 per row. I've been trying to get what I want, but no luck. Is there a solution?

<div class="serv"><ul>                                                 @foreach(App\Http\Controllers\HomeController::getservice($service->id) as     $key => $value)<li><span class="h3-service">{{$value->title}}</span><p>{!!$value->description!!}</p></li>    @endforeach</ul></div>

.serv ul {  display: inline-flex;  margin: 0;  padding: 0;  width: 33%;  text-align: left;  float: left;}.serv ul li {  list-style: none;  display: inline-block;  padding: 0;}.serv ul li span {  padding: 0;}

Viewing all articles
Browse latest Browse all 1307

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>