Vadimas Družinin Vadimas Družinin - 11 days ago 5
CSS Question

Cannot display more than two items

I'm making a webpage and for one part of it I want to display three objects in one row. The best I could do is make 2 of them display by using

width:100%
.

Does anyone have any tips i can try so it shows
3/4
? At the moment I have 5 items, it goes 2 per row. The items i'm using are made as a list.

View in Browser:

2 Items




My CSS:

css that I have

Answer

since you dont provide any code nor any more details about your framework

you can divide columns equally like below

.container{
  width: 100%;
}
.container div{
  width: 30%;
  border: 1px solid #ddd;
  height: 100px;
  float: left;
  margin: 1px; 0;
}
<div class="container">
  
  <div>some text</div>
  <div>some text</div>
  <div>some text</div>
  
 </div>

Comments