using colspan in bootstrap | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

using colspan in bootstrap

can any one explain spanning and colspan of a webpage in bootstrap ?

23rd Feb 2017, 5:53 PM
Ahmed Sayed
Ahmed Sayed - avatar
4 Answers
+ 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.
23rd Feb 2017, 6:56 PM
Michael Szczepanski
Michael Szczepanski - avatar
+ 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.
23rd Feb 2017, 6:30 PM
Michael Szczepanski
Michael Szczepanski - avatar
+ 1
@Michael thats awesome thanx so much 😊
23rd Feb 2017, 7:01 PM
Ahmed Sayed
Ahmed Sayed - avatar
0
could you please give me a simple example ? 😊
23rd Feb 2017, 6:51 PM
Ahmed Sayed
Ahmed Sayed - avatar