Click here to Skip to main content
15,896,915 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
I am new to bootstrap. I just wanted to know whether bootstrap changes the the class of a div itself when css and js files are reffered or we have to write additional js to add and remove class of a div for eg:

<div class="col-sm-3 col-sm-4 col-sm-5  col-sm-6 col-sm-7 col-sm-8 col-sm-11 col-sm-10 col-sm-12">text</div>


if I have such div then what will happen as screen size changes
Posted
Comments
Afzaal Ahmad Zeeshan 18-Jun-15 5:00am    
You have to write the class names for your elements, that bootstrap can then use to alter the state of the elements. Why don't you read the documentation of Bootstrap?

1 solution

You do not need to write any class like you have used.

Class like 'container' 'table' over Div/Section is all good to start with. You need to have bootstrap css/js link on the page or layout/master page.

Some how if links missed or exact class not getting applied you have to troubleshoot the reason instead of adding any custom class like 'col-sm-3' etc.

Accept the solution if this helps, otherwise give exact problem you faced.
 
Share this answer
 
v2
Comments
VipinKumar Maurya 18-Jun-15 5:14am    
The class which have applied 'col-sm-3' is a bootstrap class and actually I want to learn bootstrap for which I referred tutorial sites and built some pages but it is not scaling as required. If you allow then I can mail you my sample project.
Pradip Kumar Sen 18-Jun-15 10:05am    
You do not need to apply class "col-sm-3", it will automatically get applied if in parent level you have class "table" and you have used <thead> and <tbody>. Please send your sample to "nit.pradip@gmail.com", I will make it correct. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900