0
using colspan in bootstrap
can any one explain spanning and colspan of a webpage in bootstrap ?
4 ответов
+ 3
assuming that you have the bootstrap files imported correctly
<div class="row">
<span class="col-md-4">ele 1</span>
<span class="col-md-4">ele 1</span>
<span class="col-md-4">ele 1</span>
</div>
//this should display three things in a row
ele |ele |ele |
<div class="row">
<span class="col-md-9">ele 1</span>
<span class="col-md-4">ele 1</span>
</div>
//this should push the second element "to a new row"
ele | |--end of page
|ele |
<div class="row">
<span class="col-md-2">ele 1</span>
<span class="col-md-2">ele 1</span>
</div>
ele | ele| --empty-- |--end of page
*i have never actually implemented bootstrap so if this does not work i appoligize, however it should.
+ 1
its seperated into 12 colums. so starting left to right. the first element would have
col-sm-3 or something that would leave 9 spaces left so you could use any number of columns that add up to 9, in that row, if it goes over 12 it will push it to the next row. to only use one seperate each element by using class="row"
if you want to customize it to have more or less than 12 cols. then you would need to do that before you import it into your project.
+ 1
@Michael thats awesome thanx so much 😊
0
could you please give me a simple example ? 😊