Hitesh Hitesh - 1 year ago 135
CSS Question

Div below other div in bootstrap

I know this is kind of silly question but i m stuck with this for nearly 4 hours.I am new to bootstrap i m building a website for mobile view(and can also be viewed from desktop) using asp.net.I want a menu with collapse functionality in mobile i m using a div with class="navbar navbar-fixed-top" now i want another div that should come after this div.Here is my code

<div class="navbar navbar-fixed-top"><!--First div-->
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<a class="brand" href="#">Project name</a>
<div class="nav-collapse">
<ul class="nav">
<li ><a href="#">Home</a></li>
<li class="active"><a href="GridView.aspx">About</a></li>
<li><a href="#contact">Contact</a></li>
</div><!--/.nav-collapse -->



<div id="Second"> <h2 style="text-align:center;">I want this div to come after the above div</h2></div>

This gives proper output when i view in mobile but when i run in desktop i am not able to see the Second div.


Answer Source

specify a bootstrap class row or row-fluid

<div id="Second" class="row">

Plunker DEMO

Read Bootstrap Scaffolding

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download