Why isn't this navigation menu working properly? - html

This is a bootstrap navigation menu which is placed above the main menu (fixed), I'm not sure what the problem exactly is! I want it to be in one row.
This is the fixed-top navbar:
and this is how the navbar that I want it to be above it looks, it covers the fixed-top navbar and it doesn't show properly:
Below is the navigation menu code:
<nav class="navbar justify-content-between">
<ul class="nav navbar-nav navbar-right">
<li>
<p class="navbar-text">Already have an account?</p>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><b>Login</b><span class="caret"></span>
</a>
<ul id="login-dp" class="dropdown-menu">
<li>
<div class="row">
<div class="col-md-12">Login
<form class="form" role="form" method="post" action="login" accept-charset="UTF-8" id="login-nav">
<div class="form-group">
<label class="sr-only" for="exampleInputEmail2">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Email address" required>
</div>
<div class="form-group">
<label class="sr-only" for="exampleInputPassword2">Password</label>
<input type="password" class="form-control" id="exampleInputPassword2" placeholder="Password" required>
<div class="help-block text-right">
Forget the password ?
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-block">Sign in</button>
</div>
<div class="checkbox">
<label>
<input type="checkbox"> keep me logged-in
</label>
</div>
</form>
</div>
<div class="bottom text-center">New here ? <b>Join Us</b>
</div>
</div>
</li>
</ul>
</li>
</ul>
</nav>
I appreciate your help.

CSS
img{
width: 100%;
height: 500px;
}
.dropdown-menu{
background-color: #49f357;
}
.dropdown-menu{
right: 0 !important;
}
.dropdown-toggle{
background-color:#2de03c;
}
.dropdown-toggle > .active { color: aqua;}
.dropdown-toggle:hover {background-color: #0eb41c;}
.dropdown-menu > .active > a,.dropdown-menu > .active > a:hover.dropdown-menu > .active > a:focus {color: white!important; background-color: #e7e7e7!important;}
.dropdown-item{
background-color: #2de03c;
}
.dropdown-menu-center {
left: 50% !important;
right: auto !important;
text-align: center !important;
transform: translate(-50%, 0) !important;
}
.textwhite{
color:white ;
}
.collapse ul.navbar-nav> .nav-item > a {
color: white;
}
/* The container <div> - needed to position the dropdown content */
.dropdown {
position: relative;
display: inline-block;
}
.nav-collapse.collapse {
display: none !important;
height: auto !important;
overflow: visible !important;
}
.navbar{
position: sticky
}
HTML
<div class="d-none d-xl-block p-0">
<nav class=" navbar navbar-expand-md navbar-dark fixed-top" style="background-color: #10c720;">
<a class="navbar-brand" href="#">Brand</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample04"
aria-controls="navbarsExample04" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse mb-2" id="navbarsExample04">
<ul class="navbar-nav">
<li class="nav-item active" style="margin-left: 150px;">
<a routerLink="/Home" class="nav-link ml-2 mt-2 mr-2 fontsize" href="#">HOME <span
class="sr-only">(current)</span></a>
</li>
<li class="nav-item ml-2 mt-2 mr-2">
<a routerLink="/About" class="nav-link fontsize">ABOUT</a>
</li>
<li *ngIf='isMale' class="nav-item ml-2 mt-2">
<a routerLink="/Bride" class="nav-link fontsize">ABOUT</a>
</li>
<li *ngIf='isFemale' class="nav-item ml-2 mt-2">
<li class="nav-item ml-2 mt-2 mr-2">
<a routerLink="/Contact" class="nav-link fontsize">CONTACT</a>
</li>
</ul>
<div class="dropdown text-center border border-danger ">
<button class="btn btn-success dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Login
</button>
<div class="row border border-primary">
<div class="dropdown-menu dropdown-menu-center border border-danger" aria-labelledby="dropdownMenuButton">
<div class="">Login
<form class="form" role="form" method="post" action="login" accept-charset="UTF-8" id="login-nav">
<div class="form-group">
<label class="sr-only" for="exampleInputEmail2">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail2" placeholder="Email address"
required>
</div>
<div class="form-group">
<label class="sr-only" for="exampleInputPassword2">Password</label>
<input type="password" class="form-control" id="exampleInputPassword2" placeholder="Password"
required>
<div class="help-block text-right">
Forget the password ?
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-block">Sign in</button>
</div>
<div class="checkbox">
<label>
<input type="checkbox"> keep me logged-in
</label>
</div>
</form>
</div>
<div class="bottom text-center">New here ? <b>Join Us</b>
</div>
</div>
</div>
</div>
</div>
</nav>
</div>
Output

Related

how to make a transparent modal in bootstrap?

I am using Bootstrap to create a modal. It is in a Navbar and if we click on the Login or Signup button, the modal appears. The Navbar is transparent in color unless you hover on it so that it turns white. I want the Modal to be transparent as well but it is transparent relative to the color of the Navbar which is white. Say my background is red in color, the modal will appear white instead of red and I want it to look red.
Here's my modal
<!--Login-->
<li class="nav-item">
<div class="col-md-auto col-sm-auto col-auto" style="margin: 1vw;">
<!-- Button trigger modal -->
<button type="button" class="btn btn1" data-bs-toggle="modal" data-bs-target="#LoginModal">
Login
</button>
<!-- Modal -->
<div class="modal fade" id="LoginModal" tabindex="-1" aria-labelledby="LoginModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header text-dark bg1">
<h5 class="modal-title" id="LoginModalLabel">Login</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-dark bg1">
<!--Form-->
<form>
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Email
address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
<div id="emailHelp" class="form-text">We'll never share your email
with anyone else.</div>
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1">
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Check me
out</label>
</div>
<button type="submit" class="btn btn-primary" data-bs-dismiss="modal">Submit</button>
</form>
</div>
<div class="modal-footer text-dark bg1">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</li>
Here's my CSS:
.navbar{
background-color: transparent;
}
.navbar:hover{
background-color: white;
}
.btn1:hover{
color: blueviolet;
}
.bg1{
background-color: transparent;
}
body{
background-color: tomato;
}
I don’t know if the background-color for your modal is getting set because you have it as a child of the navbar (you didn’t include a working snippet, so it’s not possible to see your code in action), but I tried your setup with the modal separate from the navbar and it seems to work (i.e. the modal is transparent).
I added transitions and hover effects for the background colors for the navbar and the modal so you can see it in operation.
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdn.jsdelivr.net/npm/#popperjs/core#2.9.2/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.1/dist/js/bootstrap.min.js"></script>
<style>
body {
background-color: tomato;
}
.navbar {
background-color: transparent;
transition: background-color 0.3s ease-in-out;
}
.navbar:hover {
background-color: white;
}
.btn1:hover {
color: blueviolet;
}
.bg1 {
background-color: transparent;
}
#LoginModal .modal-content {
background-color: transparent;
transition: background-color 0.3s ease-in-out;
}
#LoginModal .modal-content:hover {
background-color: white;
}
</style>
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<button type="button" class="btn btn1" data-bs-toggle="modal" data-bs-target="#LoginModal">
Login
</button>
</li>
</ul>
</div>
</div>
</nav>
<!-- Modal -->
<div class="modal fade" id="LoginModal" tabindex="-1" aria-labelledby="LoginModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header text-dark bg1">
<h5 class="modal-title" id="LoginModalLabel">Login</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-dark bg1">
<!--Form-->
<form>
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Email
address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
<div id="emailHelp" class="form-text">We'll never share your email
with anyone else.</div>
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1">
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Check me
out</label>
</div>
<button type="submit" class="btn btn-primary" data-bs-dismiss="modal">Submit</button>
</form>
</div>
<div class="modal-footer text-dark bg1">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

How to center tabs in bootstrap4?

I want to show my login/Signup tabs and their relative form in the middle of the page and also want to small textfileds like col-md-12 to col-md-4 but when I use style="margin-left=200px;" the form will be in the middle but in mobile mode it is not showing so I removed style="margin-left=200px;"
html,
body {
height: 100%;
}
body {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
padding-top: 40px;
padding-bottom: 40px;
background-color: #f5f5f5;
}
.form-signin {
width: 100%;
max-width: 330px;
padding: 15px;
margin: auto;
}
.form-signin .checkbox {
font-weight: 400;
}
.form-signin .form-control {
position: relative;
box-sizing: border-box;
height: auto;
padding: 10px;
font-size: 16px;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<div class="container">
<br>
<h4 class="text-center">User Panel</h4>
<hr>
<!-- Nav tabs -->
<ul class="nav nav-tabs form-signin" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#home">Login</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#menu2">SignUp</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div id="home" class="container tab-pane active"><br>
<form class="form-signin">
<img class="mb-4" src="https://camu.in/assets/img/avatar1.svg" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<div class="checkbox mb-3">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
<p class="mt-5 mb-3 text-muted">© 2017-2018</p>
</form>
</div>
<div id="menu2" class="container tab-pane fade"><br>
<p>Signup</p>
<form class="form-signin">
<img class="mb-4" src="https://camu.in/assets/img/avatar1.svg" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<div class="checkbox mb-3">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
<p class="mt-5 mb-3 text-muted">© 2017-2018</p>
</form>
</div>
</div>
</div>
I want to produce below output the tabs and form in the middle of the page but I am not able to do it. Kindly check below image what I want. Also when I click on SignUp everything is messed up.
Center the ul with the class-name nav-tabs by adding the class-name justify-content-center. Additionally, touch the active tab and the gray border by adding the class-name pb-0 to the nav-tabs.
So, it is <ul class="nav nav-tabs form-signin justify-content-center pb-0" role="tablist"> instead of <ul class="nav nav-tabs form-signin" role="tablist">.
html,
body {
height: 100%;
}
body {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
padding-top: 40px;
padding-bottom: 40px;
background-color: #f5f5f5;
}
.form-signin {
width: 100%;
max-width: 330px;
padding: 15px;
margin: auto;
}
.form-signin .checkbox {
font-weight: 400;
}
.form-signin .form-control {
position: relative;
box-sizing: border-box;
height: auto;
padding: 10px;
font-size: 16px;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<div class="container">
<h4 class="text-center">User Panel</h4>
<!-- Nav tabs -->
<ul class="nav nav-tabs form-signin justify-content-center pb-0" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#home">Login</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#menu2">SignUp</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div id="home" class="container tab-pane active"><br>
<form class="form-signin">
<img class="mb-4" src="https://camu.in/assets/img/avatar1.svg" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<div class="checkbox mb-3">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
<p class="mt-5 mb-3 text-muted">© 2017-2018</p>
</form>
</div>
<div id="menu2" class="container tab-pane fade"><br>
<form class="form-signin">
<img class="mb-4" src="https://camu.in/assets/img/avatar1.svg" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">Please sign up</h1>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
<p class="mt-5 mb-3 text-muted">© 2017-2018</p>
</form>
</div>
</div>
</div>
You can use the following solution using justify-content-center on the element.
<ul class="nav nav-pills mb-3 justify-content-center">
Just use the bootstrap class "justify-content-center" in your element as
<ul class="nav nav-tabs form-signin justify-content-center" role="tablist">
link to the jsbin

Multiple input box in inline form

I use the solution provide by #dippas here
Inline form make input text full width and responsive
My new request is how to put multiple input text and fill all the space.
I am aware that we can not use width with inline form like mention in bootstrap website
Requires custom widths Inputs, selects, and textareas are 100% wide by
default in Bootstrap. To use the inline form, you'll have to set a
width on the form controls used within. The default width of 100% as
all form elements gets when they got the class form-control didn't
apply if you use the form-inline class on your form.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
.form-inline {
display: flex;
padding:5px !important;
}
.flex {
flex: 1;
display: flex !important
}
.flex input {
flex: 1 !important ;
padding-right:15px !important;
}
.form-inline .form-group {
padding-right:15px !important;
}
</style>
<div class="panel panel-primary">
<div class="panel-heading">
<h4><b>Search Options</b></h4>
</div>
<div class="panel-body">
<form class="form-inline">
<div class="form-group">
<div class="btn-group">
<button type="button"
class="btn btn-default dropdown-toggle"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>Account ID <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li>Account ID</li>
<li>Company Name</li>
<li>Account Type</li>
<li>Marketplaces</li>
</ul>
</div>
</div>
<div class="row" style="display: block">
<div class="form-group flex" >
<input class="form-control" type="text" value="" id="filter_id" placeholder="Put your filter here">
<button type="button" class="btn btn-danger"> Fermer </button>
</div>
<div class="form-group flex">
<input class="form-control" type="text" value="" id="filter_id" placeholder="Put your filter here">
<button type="button" class="btn btn-danger"> Fermer </button>
</div>
<div class="form-group flex">
<input class="form-control" type="text" value="" id="filter_id" placeholder="Put your filter here">
<button type="button" class="btn btn-danger"> Fermer </button>
</div>
</div>
</form>
</div>
</div>
you need to add display:flex to .row, because now the parent of .flex is .row
/* !important only for this snippet */
.form-inline {
display: flex;
padding: 5px !important;
}
.row {
display: flex;
flex-wrap: wrap;
flex: 1
}
.flex {
flex: 0 100%;
display: flex !important
}
.flex input {
flex: 1 !important;
padding-right: 15px !important;
}
.form-inline .form-group {
padding-right: 15px !important;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="panel panel-primary">
<div class="panel-heading">
<h4><b>Search Options</b></h4>
</div>
<div class="panel-body">
<form class="form-inline">
<div class="form-group">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Account ID <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li>Account ID</li>
<li>Company Name</li>
<li>Account Type</li>
<li>Marketplaces</li>
</ul>
</div>
</div>
<div class="row">
<div class="form-group flex">
<input class="form-control" type="text" value="" id="filter_id" placeholder="Put your filter here">
<button type="button" class="btn btn-danger"> Fermer </button>
</div>
<div class="form-group flex">
<input class="form-control" type="text" value="" id="filter_id" placeholder="Put your filter here">
<button type="button" class="btn btn-danger"> Fermer </button>
</div>
<div class="form-group flex">
<input class="form-control" type="text" value="" id="filter_id" placeholder="Put your filter here">
<button type="button" class="btn btn-danger"> Fermer </button>
</div>
</div>
</form>
</div>
</div>

Elements appearing in divs that they shouldn't be: HTML

I have a landing section in my HTML and I have icons below the landing. I can't figure out why the icons keep appearing in my landing div. I've checked for unclosed tags numerous times. I think I need another pair of eyes. Here is my HTML:
<!DOCTYPE html>
<html>
<head>
<title>Fitness Food Tracker</title>
<script src="vendor.bundle.js" type="text/javascript" charset="utf-8" defer></script>
<script src="bundle.js" type="text/javascript" charset="utf-8" defer></script>
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Montserrat">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body class="container-fluid">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><img class="brand" alt="Brand" src="assets/styles/apple.png"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active">Link <span class="sr-only">(current)</span></li>
<li>Link</li>
<li class="dropdown">
Dropdown <span class="caret"></span>
<ul class="dropdown-menu">
<li>Action</li>
<li>Another action</li>
<li>Something else here</li>
<li role="separator" class="divider"></li>
<li>Separated link</li>
<li role="separator" class="divider"></li>
<li>One more separated link</li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li>Link</li>
<li class="dropdown">
<i class="material-icons">account_circle</i> <span class="caret"></span>
<ul class="dropdown-menu">
<li>Sign Up</li>
<li>Sign In</li>
<li class="hidden" id="nav-li-user-stats">Update User Stats</li>
<li class="hidden" id="nav-li-sign-out">Sign Out</li>
<li class="hidden" id="nav-li-change-password">Change Password</li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class='landing'>
<!--- Sign Up Form ---->
<form class="form-horizontal hidden" id=sign-up-form>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
<div class="col-sm-6">
<input type="email" class="form-control" name="credentials[email]" id="inputEmail3" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">Password</label>
<div class="col-sm-6">
<input type="password" class="form-control" name="credentials[password]" id="inputPassword3" placeholder="Password">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">Confirm Password</label>
<div class="col-sm-6">
<input type="password" name="credentials[password_confirmation]" class="form-control" id="inputPassword3" placeholder="Password Confirmation">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Sign Up</button>
</div>
</div>
</form>
<!-- Update User -->
<form id='update-user-form' class='hidden'>
<div class="form-group row">
<label for="weight-input" class="col-sm-2 form-control-label">Weight</label>
<div class="col-sm-10">
<input type="" class="form-control" id="weight-input" name="user[weight]" placeholder="Enter Your Weight">
</div>
</div>
<div class="form-group row">
<label for="height-input" class="col-sm-2 form-control-label">Height</label>
<div class="col-sm-10">
<input type="" class="form-control" id="height-input" name="user[height]" placeholder="Enter Your Height">
</div>
</div>
<div class="form-group row">
<label for="age-input" class="col-sm-2 form-control-label">Age</label>
<div class="col-sm-10">
<input type="" class="form-control" id="age-input" name="user[age]" placeholder="Enter Your Age">
</div>
</div>
<div class="form-group row">
<label for="gender-input" class="col-sm-2 form-control-label">Gender</label>
<div class="col-sm-10">
<input type="" class="form-control" id="gender-input" name="user[gender]" placeholder="Enter Your Gender (m or f)">
</div>
</div>
<div class="form-group row">
<label for="activity-input" class="col-sm-2 form-control-label">Activity Level</label>
<div class="col-sm-10">
<input type="" class="form-control" id="activity-input" name="user[activity_level]" placeholder="Enter Acitivty Multiplier">
</div>
</div>
<button type="submit" class="btn btn-primary auth-form-element">
Submit Your Info
</button>
</form>
<!-- Sign In form -->
<form class="form-horizontal hidden" id=sign-in-form>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
<div class="col-sm-6">
<input type="email" class="form-control" name="credentials[email]" id="inputEmail3" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-2 control-label">Password</label>
<div class="col-sm-6">
<input type="password" class="form-control" name="credentials[password]" id="inputPassword3" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Sign In</button>
</div>
</div>
</form>
<div class="jumbotron">
<div class="container">
<h1 class='landing-header'>Fitness Food Tracker</h1>
<h3>An App For Tracking Your Calories and Maintaining Your Physique.</h3>
</div>
</div>
</div>
<!---Below Landing --->
<!-- Food Search-->
<div class="col-md-6 search-input hidden">
<label>Search For Food</label>
<div class="input-group">
<input type="text" id='search-input-field' class="form-control" placeholder="Search for foods">
<span class="input-group-btn">
<button class="btn btn-primary" id='food-search-btn' type="button">Search!</button>
</span>
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<!-- Meal Builder Display-->
<div id="meal-content" class='hidden'>
<ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
<li class="active">Search Results</li>
<li>Your Meal</li>
</ul>
<div id="my-tab-content" class="tab-content">
<div class="tab-pane active" id="red">
<div class="search-table table-responsive table-bordered hidden">
</div>
</div>
<div class="tab-pane" id="orange">
<div class="meal-table table-responsive table-bordered hidden">
<table class="table table-condensed">
<tr>
<th class='hidden'>id</th>
<th>Description</th>
<th>Calories</th>
<th>Grams Per Serving</th>
<th>Fat Mono</th>
<th>Fat Poly</th>
<th>Fat Sat</th>
<th>Carbs</th>
<th>Sugar</th>
<th>Fiber</th>
<th>Protien</th>
<th>Sodium</th>
<th>Cholesteral</th>
</tr>
</table>
</div>
<label> Meal Macro Totals</label>
<div class="meal-total-table table-responsive table-bordered hidden">
<table class="table table-condensed">
</table>
</div>
</div>
</div>
</div>
<div class='col-md-4 icon-div'>
<i class="material-icons icon">create</i><br>
Log Your Meals
</div>
<div class='col-md-4 icon-div'>
<i class="material-icons icon">fitness_center</i><br>
Maintain Your Fitness
</div>
<div class='col-md-4 icon-div'>
<i class="material-icons icon">track_changes</i><br>
Track Changes Over Time
</div>
</body>
</html>
EDIT:
Here is my CSS:
$icon-font-path: '~bootstrap-sass/assets/fonts/bootstrap/';
#import '~bootstrap-sass/assets/stylesheets/bootstrap';
$orange: #EB8921;
$lite-orange: #F5AD28;
$white: #FFFFFF;
$gray: #2E2F2F;
$darker-gray: #1E1E1E;
$black: #000000;
body {
font-family: 'Montserrat', sans-serif;
background-color: $gray;
color: $lite-orange;
};
.landing {
background-image: url("http://wallpapercave.com/wp/EnDM8YS.jpg");
background-repeat: no-repeat;
background-position: center;
background-size: cover;
position: absolute;
min-width: 100%;
margin-top: 5%;
height: 600px;
}
form {
width: 40%;
margin: 0 auto;
}
#meal-content {
margin-top: 8%;
}
.landing-header {
color: $orange;
}
.icon-div {
text-align: center;
background-color: $gray;
}
.icon {
padding-top: 10%;
font-size: 8em;
color: $white;
margin-bottom: 5%;
}
.jumbotron {
background: rgba(0, 0, 0, 0);
text-shadow: .25px 0 0 $black, -.25px 0 0 $black, 0 .25px 0 $black, 0 -.25px 0 $black, .25px .25px $black;
padding-top: 10%;
padding-bottom: 30%;
margin-left: 10%;
margin-right: 10%;
margin-bottom: 10%;
}
.btn-primary {
background: $orange;
border-color: $black;
}
.table-responsive {
max-height: 400px;
overflow: auto;
font-size: .75em;
margin-left: 5%;
margin-right: 5%;
background-color: $darker-gray;
margin-bottom: 10%;
}
.input-group-sm {
min-width: 50px;
}
.search-input {
margin-bottom: 10%;
padding-top: 10%;
float: none;
margin-right: auto;
margin-left: auto;
}
.add-food-btn {
border-radius: 100%;
}
.table {
border: $black;
}
.a.dropdown-toggle {
padding: 0 !important;
}
.brand {
height: 100%;
margin: 5%;
}
.navbar-brand {
padding: 0;
margin-bottom: 5%;
}
The problem here is that the icons end up behind the navbar because the navbar is fixed. Simply adding padding-top to the body should create some whitespace under the navbar and fix your problem.

form-inline causing overlap of individual form-group components

as I learn more about bootstrap, I am making good progress but I am once again faced with a basic challenge. This is about inline-forms.
Please see attached screenshot. As you can see, I have two problems. The first and easily identifiable is that in the 'experience' section - this is an inline form nested within a form-group and the problem is overlapping fields. Ideally they should all be next to each other with a 10px buffer between them. The code for this section is below
<div class="form-group row-top-buffer">
<label for="experience" class="col-md-3 control-label">Experience</label>
<div class="col-md-9 form-inline" role="form">
<div class="form-group col-md-3">
<label class="sr-only" for="jobMinExperience">Min Experience</label>
<input type="text" class="form-control" id="jobMinExperience" placeholder="0" />
</div>
<div class="form-group col-md-3">
<label class="sr-only" for="jobMaxExperience">Max Experience</label>
<input type="text" class="form-control" id="jobMaxExperience" placeholder="0" />
</div>
<div class="form-group col-md-3">
<label class="sr-only" for="jobExperienceDropDown">Experience</label>
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="jobExperienceDropDown" data-toggle="dropdown">
Dropdown
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="jobExperienceDropDown">
<li role="presentation">
<a role="menuitem" tabindex="-1" href="#">years</a>
</li>
<li role="presentation">
<a role="menuitem" tabindex="-1" href="#">months</a>
</li>
</ul>
</div>
</div>
</div>
</div>
The second problem which is not so apparent, is the one in the 'Location' row. I have two rows of components. the first is a simple full-width text input. The second row however is an inline form comprising of multiple components. Here I would like the final text box, for zip code, to stretch until the end of the 1st row - but it abruptly stops short. Code for this secion is provided below
<div class="form-group row-top-buffer">
<label for="jobLocation" class="col-md-3 control-label">Location</label>
<div class="col-md-9">
<input type="text" class="form-control" id="jobStreet" name="jobStreet" placeholder="Street" />
<div class="form-inline" role="form" style="padding-top: 9px;">
<div class="form-group col-md-5">
<label class="sr-only" for="jobCity">City</label>
<input type="text" class="form-control" id="jobCity" name="jobCity" placeholder="City" />
</div>
<div class="form-group col-md-2 margin-0">
<label class="sr-only" for="jobState">State</label>
<?
include_once 'stateDropDown.php';
?>
</div>
<div class="form-group col-md-3 margin-0">
<label class="sr-only" for="jobZip">City</label>
<input type="text" class="form-control" id="jobZip" name="jobZip" placeholder="00000" />
</div>
</div>
</div>
</div>
Form layout has a lot to do with the class on the form itself, such as form-horizontal, which is the type of form your screen shot reflects. However, your html was mixing inline form classes and combining col classes on the form-group, which is like adding a column class to a row --it's not done. Anyway, this is not your exact form, but it is commented enough to get what you want once you learn it. I put in your dropdowns just for this, but unless you're using some addon that makes selects into dropdowns (there is one) you would use a select menu in a form.
DEMO: http://jsbin.com/fecib/2/edit
<form class="form-horizontal my-form" role="form">
<div class="form-group">
<label class="col-sm-3 control-label">Location</label>
<div class="col-sm-9">
<input type="text" class="form-control" placeholder="location">
</div><!-- /col-sm-9 -->
</div><!-- /form-group -->
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div class="form-group"> <!-- nested form-group acting like row -->
<div class="col-sm-6">
<input type="text" class="form-control" placeholder="City">
</div><!-- /col-sm-6 -->
<div class="col-sm-4">
<input type="text" class="form-control" placeholder="State">
</div><!-- /col-sm-4 -->
<div class="col-sm-2">
<input type="text" class="form-control" placeholder="Zip">
</div><!-- /col-sm-2 -->
</div> <!-- /nested form-group acting like row -->
</div><!-- /col-sm-offset-3 col-sm-9 -->
</div><!-- /form-group -->
<div class="form-group">
<label for="location" class="col-sm-3 control-label">Priority</label>
<div class="col-sm-9">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="jobExperienceDropDown" data-toggle="dropdown"> Dropdown <span class="caret"></span> </button>
<ul class="dropdown-menu" role="menu" aria-labelledby="jobExperienceDropDown">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="#">years</a> </li>
<li role="presentation"> <a role="menuitem" tabindex="-1" href="#">months</a> </li>
</ul>
</div><!-- /dropdown -->
</div><!-- /col-sm-9-->
</div><!-- /form-group -->
<div class="form-group">
<label class="col-sm-3 control-label">Experience</label>
<div class="col-sm-9">
<div class="form-group"><!-- nested form-group acting like row -->
<div class="col-sm-4">
<input type="text" class="form-control" placeholder="0">
</div><!-- /.col-sm-4 -->
<div class="col-sm-4">
<input type="text" class="form-control" placeholder="0">
</div><!-- /.col-sm-4 -->
<div class="col-sm-4">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="jobExperienceDropDown" data-toggle="dropdown"> Dropdown <span class="caret"></span> </button>
<ul class="dropdown-menu" role="menu" aria-labelledby="jobExperienceDropDown">
<li role="presentation"> <a role="menuitem" tabindex="-1" href="#">years</a> </li>
<li role="presentation"> <a role="menuitem" tabindex="-1" href="#">months</a> </li>
</ul>
</div><!-- /dropdown -->
</div><!-- /.col-sm-4 -->
</div><!-- /nested form-group acting like row -->
</div><!-- /.col-sm-9 -->
</div><!-- /.form-group -->
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-default">Sign in</button>
</div>
</div>
</form>
CSS:
/* ----------- adjusted nested columns grid ----------- */
.my-form .form-group [class*="col-"] .form-group [class*="col-"] {
padding-left: .5%;
padding-right: .5%;
}
.my-form .form-group [class*="col-"] .form-group {
margin-left: -.5%;
margin-right: -.5%;
}
.my-form .form-group [class*="col-"] .form-group [class*="col-"]:not(:last-child) {
margin-bottom: 10px
}
#media (min-width:768px) {
.my-form .form-group [class*="col-"] .form-group [class*="col-"]:not(:last-child) {
margin-bottom: 0
}
}
.my-form .form-group [class*="col-"] .form-group {
margin-bottom: 0
}