refactoring - Applying bootstrap only on mobile -


i have legacy website work on , not support mobile browsers. web has gigantic amount of css files , & feel of web not modified. bootstrap used make web responsive mobile users.

the problem is, i'd web apply bootstrap mobile browsers. let's following html code legacy web , it's not responsive.

<div id="header">      <div><img src="view/image/logo.png"/></div>      <div><img src="view/image/lock.png"</div>  </div>

if add row , column classes...

<div id="header" class="row">      <div class="col-xs-6"><img src="view/image/logo.png"/></div>      <div class="col-xs-6"><img src="view/image/lock.png"/></div>  </div>

now, responsive mobile browsers .row changes margin & padding of #header pc browsers not meant be. so, came 2 solutions problem.

  1. import bootstrap under @media.

    • i think impossible because bootstrap has own @media queries. also, having @media under @media total nonsense.
  2. detect whether current browser on pc or mobile before loading bootstrap theme.

    • this better solution #1 , can't come drawbacks it.

are there alternative approaches tackle problem?


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -