-1

I want to place number of columns in a row dynamically. For example each student in students list should have one column. The width of the column should depend on number of students.

enter image description here

Any help is much appreciated.

Thanks Salman

1 Answer 1

0

With bootstrap 5, you can just use the col class, and it will stretch to fill the space. Then you can set the min-width of the elements in CSS with media breakpoints to get it to wrap when you want.

<div class="col" *ngFor="let student of studentList"></div>
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks @z4nzib4r I Should have mentioned I am using bootstrap 3
In that case, you are stuck doing a bunch of if statements on ng-containers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.