i am new to twitter bootstrap. Recently i started working on a project(a Q&A site) using twitter bootstrap 3 for designing.i have encountered a major problem with the designing.
At first the basic structure of my website which I followed throughout almost all web pages of my site :
<div class="container-fluid" >
<nav class="navbar navbar-inverse" role="navigation">....</nav>
<div class="jumbotron" > .... </div>
<div class="row">
<div class="col-md-1 text-center"> ... </div>
<div class="col-md-1 text-center"> ... </div>
<div class="col-md-7 text-center"> ... </div>
<div class="col-md-1 text-center"> ... </div>
</div>
</div>
My Problem :
my website works absolutely fine when my browser is maximized. All the problems starts when I Resize my browser or when I open my Website on my Android Mobile phone
- All my
Div
s which are written with inDiv.row
, which are supposed to be alligned horizontally one besides another(i think the usedfloat:left
) are getting stacked. Its breaking entire structure of my website. they all are getting stacked one above another (vertically) upon browser resizing or when i open my site in a mobile phone - Even the structure of my nav bar is also getting broken. All the nav bar elemnts are also getting stacked instead of floating horizontally
What I Want :
i noticed that upon resizing or on mobile phone, Bootstrap rsizing text size according to screen size, which is very good and am very happy with thatbut what i want is
- upon browser resizing or when i open my site in a mobile phone it Won't break the structure of my site , all the
div
s will be Horizontally aligned one besides another as it is when browser is maximized and to achieve this it will add a horizontal scroll bar upon browser resizing or when i open my site in a mobile phone
Here I did some MS-Paint to explain my problem
Fig 1 : What I am having on my laptop when Browser is Maximized :
Fig 2 : What I am getting upon browser resizing or when i open my site in a mobile phone
Fig 3 : What I want upon browser resizing or when i open my site in a mobile phone
My Try :
As i am new to bootstrap
i didnt try to alter / cutomize too many in the css files . what i have tried is i have applied overflow-x:auto;
on .container-fluid
, .row
, .nav
but it didnt help me. no problem is solved