css - Bootstrap and phone orientation - form buttons positioning -


i'm trying position form buttons using bootstrap responsive layout grid. code part looks like:

<div class="row">     <div class="col-xs-6 col-sm-4 col-md-3">         <div class="form-actions">             <input type="submit" name="update_cart" value="update totals" class="btn btn-block btn-plain" />         </div>     </div>     <div class="col-xs-6 col-sm-4 col-md-3">         <div class="form-actions">             <input type="submit" name="empty_cart" value="empty cart" class="btn btn-block btn-plain btn-danger" />         </div>     </div>     <div class="col-xs-12 col-sm-4 col-md-6">         <div class="form-actions">             <input type="submit" name="next" value="checkout" class="btn btn-block btn-plain pull-right btn-wide" />         </div>          </div>    </div> 

based on code above expect have col-xs- executed when phone (samsung galaxy s3 @ case - 720px 1280px) in vertical orientation , when phone horizontal orientation have col-sm- executed, stays on col-xs-

my css contains (based on boostrap grid options , ipad/iphone/sgs resolutions):

@media (max-width: 767px) @media (min-width: 768px) @media (min-width: 992px) @media (min-width: 992px) , (max-width: 1199px) @media (max-width: 1024px) @media (max-width: 1280px) 

any clue why not switching based on phone orientation/resolution , grid options?

test page: http://www.bootply.com/121024

thanks

the default values media queries in bootstrap are:

  • col-lg-; @screen-lg: 1200px; @media (min-width: @screen-lg) { }
  • col-md-; @screen-md: 992px; @media (min-width: @screen-md) { }
  • col-sm-; @screen-sm: 768px; @media (min-width: @screen-sm) { }
  • col-xs-; @screen-xs: 480px; @media (min-width: @screen-xs) { }

tha means on samsung galaxy s3 phone (with 1280x720px display) you'll have:

  • in vertical position: col-xs- (because: @screen-xs < 720px < @screen-sm)
  • in horizontal position: col-lg- (because: @screen-lg < 1280px)

good luck!


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -