Can I give the col-md-1.5 in bootstrap?
Can I give the col-md-1.5 in bootstrap?
I want to adjust the columns in Twitter Boοtstrap. I know in bootstrap there are 12 columns grid. Is there any way to manipulate the grids to have 1.5 3.5 3.5 3.5 instead of 3 3 3 3?
stackoverflow.com
cols를 이용한 그리드 방식은 무척 편리하지만, 커스터마이징이 필요할 때가 있다.
구글링 하다 찾은 위의 글에 따르면 2.5 혹은 6.2 식으로 주는 건 불가능하다.
대신 style을 이용해 덮어씌우면 된다.
style="width: 15%"
이런 식으로...
다만 Bootstrap 4 이상에서는 flex랑 max-width 속성까지 설정해줘야 적용 된다.
style="width: 15%; flex: 0 0 15%; max-width: 15%;"
이는 BootstrapVue에서도 동일하게 적용 된다.