TheWalkingPlay2500 TheWalkingPlay2500 - 20 days ago 6
CSS Question

Bootstrap: resizing a window if is a mobile device

I need to make a login menu, but I want to do something like this:

Width:

Cellphones: 100%

Tablets: 50%

Computers: 25%

I tried to do col-??-value, but It didn't worked well. Any sugestions?

Answer
<div class="col-md-3 col-sm-6 col-xs-12">

Computer: 25% = 12/4 = col-md-3 (col-lg-3 is also but it will be computed by default equal to col-md);

tablets: 50% = 12/2 = col-sm-6;

cellphones: 100% = 12cells= col-xs-12

to center a menu you can add offsets: col-md-offset-4 col-sm-offset-3