Positioning page title next to menu button in a top bar - html

I am creating a top bar where I just want a menu icon in the left, the page title next to it and I will add a search bar in the right side but I will do that later.
I followed w3schools guide to create a collapsed sidebar and it works but I would like to achieve two more things:
The menu icon is smaller than the bar itself where it is positioned. I would like it to increase its size so it fills the bar.
I want the page title to be displayed next to it but I am not able to achieve this no matter where I place the that contains it.
I am going to remove the sidepanel code as it is working and it does not have to do with my issue positioning the menu icon and the page title:
#wrapper-header {
color: white;
font-size: 28px;
float: left;
width: 100%;
height: 65px;
background-color: #2E2D30;
}
#main-header {
position: relative;
width: 1200px;
left: 50%;
margin-left: -400px;
height: auto;
}
.page-title {
position: relative;
margin-top: -35px;
left: 150px;
}
<!-- Add icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div id="wrapper-header">
<div id="main-header">
<button class="openbtn" onclick="openNav()">☰</button>
<div class="page-title">Recientes</div>
</div>
</div>

So, basically I had to change a little bit your css
#wrapper-header {
color: white;
font-size: 28px;
float: left;
width: 100%;
height: 65px;
background-color: #2E2D30;
}
#main-header {
position: relative;
}
.page-title {
position: absolute;
height: 20px;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.openbtn {
height: 30px;
width: 30px;
margin-top: 18px;
margin-left: 20px;
transform: scale(2);
}
<!-- Add icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div id="wrapper-header">
<div id="main-header">
<button class="openbtn" onclick="openNav()">☰</button>
<div class="page-title">Recientes</div>
</div>
</div>
Here is a fiddle or just run snippet code from the answer to see the result
NB: I used transform: scale(2); to fit the button to the navbar cause if you just change width and height the icon will remain too small
Let me know if it answer your question and if you need some further information

Have a look please, I think you are looking for something like this
/* ------------ top menu -------------- */
.navbar{font-family:Arial; background-color:#4F0D1B; border:0; border-radius:0px}
.navbar-collapse{padding-left:0; padding-right:0;}
.navbar-toggle{margin:7px; color:#fff}
.navbar{margin:0; z-index:999;}
ul.navbar-nav > li > a{color:#fff; padding:20px 30px; line-height: 30px; transition:all ease 0.5s; z-index: 99; min-width: 96px; text-align: center; text-transform: uppercase; }
ul.navbar-nav > li a:hover, ul.navbar-nav > li.active,
ul.nav .open > a:focus, ul.nav li > a:focus {background-color:#830F27; transition:all ease 0.5s;}
/* when clicked */
.nav .open > a, .nav .open > a:hover, .nav .open > a:focus {
background-color: #830F27;
}
/* submenu style */
.navbar .dropdown-menu{z-index:999; min-width:100%; border:0; background-color:#4F0D1B}
.navbar .dropdown-menu li a{text-align:left; padding:15px; color:#fff; }
/* mega menu */
.mega-dropdown { position: static !important; }
.mega-dropdown-menu { z-index:999999;
padding: 20px 0px;
width: 100%;
-webkit-box-shadow: none;
border-bottom-left-radius:10px;
border-bottom-right-radius:10px;
background-color:#7A0E23!important;
}
.mega-dropdown-menu ul{margin:0; padding:0}
.mega-dropdown-menu li {color:#fff; list-style: outside none}
.mega-dropdown-menu li a{padding:5px!important; display:block!important; }
.mega-dropdown-menu li a:hover{background-color:#4F0D1B!important}
a.title-submenu{font-weight:bold; color:rgba(0,0,0,.5); }
/* search form */
.searchform{padding:10px 15px; float:right}
.searchform .btn{ color:rgba(200,200,200,.5);border: 1px solid transparent; background-color:#830F27; }
.searchform .form-control{
border:0; color:#fff;
background-color:rgba(200,200,200,.1);
width:120px!important;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
transition: all .5s ease;
}
.searchform .form-control:hover, .searchform .form-control:focus {
width: 170px!important;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<div class="container">
<p>Mega menu using bootstrap, width search bar </p>
<nav class="navbar" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
<span class="toggle-menu ">MENU</span>
</button>
<!-- <a class="navbar-brand" href="#">Home</a> -->
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav">
<li><i class="glyphicon glyphicon-search"></i></li>
<li>Home page</li>
</ul>
<form action="#" method="get" class="searchform navbar-form" role="search">
<input type="hidden" value="search" name="view">
<div class="input-group">
<input type="text" name="searchword" required class="form-control" placeholder="Search" name="q">
<div class="input-group-btn">
<button class="btn" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
</div><!-- /.navbar-collapse -->
</nav>
</div>

Related

How to put a dropdown inside another in bootstrap 3?

I'm designing a sidebar for mobile and trying to create a dropdown within another dropdown using bootstrap 3 but I do not get it and I do not understand what happens.
When I try to access the dropdown within another one, the two dropdown closes and I do not understand what I should do.
I think it's css problem but I do not know what happens.
//function sidebar
window.onload = function() {
window.jQuery ? $(document).ready(function() {
$(".sidebarNavigation .navbar-collapse").hide().clone().appendTo("body").removeAttr("class").addClass("sideMenu").show(), $("body").append("<div class='overlay'></div>"), $(".navbar-toggle").on("click", function() {
$(".sideMenu").addClass($(".sidebarNavigation").attr("data-sidebarClass")), $(".sideMenu, .overlay").toggleClass("open"), $(".overlay").on("click", function() {
$(this).removeClass("open"), $(".sideMenu").removeClass("open")
})
}), $(window).resize(function() {
$(".navbar-toggle").is(":hidden") ? $(".sideMenu, .overlay").hide() : $(".sideMenu, .overlay").show()
})
}) : console.log("sidebarNavigation Requires jQuery")
};
$(document).ready(function() {
// dropdown animation
$('.dropdown').on('show.bs.dropdown', function(e) {
$(this).find('.dropdown-menu').first().stop(true, true).slideDown(250);
});
$('.dropdown').on('hide.bs.dropdown', function(e) {
$(this).find('.dropdown-menu').first().stop(true, true).slideUp(0);
});
});
.overlay,
.sideMenu {
position: fixed;
bottom: 0
}
.overlay {
top: 0;
left: -100%;
right: 100%;
margin: auto;
background-color: rgba(0, 0, 0, .4);
z-index: 998;
transition: all ease 20ms
}
.sideMenu,
.sidebarNavigation {
z-index: 999;
margin-bottom: 0
}
.overlay.open {
left: 0;
right: 0
}
.sidebarNavigation .left-navbar-toggle {
float: left;
margin-right: 0;
margin-left: 15px
}
.sideMenu {
left: -100%;
top: 52px;
transition: all ease-in-out .4s;
overflow: hidden;
width: 100%;
max-width: 50%
}
.sideMenu.open {
left: 0;
display: block;
overflow-y: auto
}
.sideMenu ul {
margin: 0
}
.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
background-color: #69306d;
}
.navbar .navbar-toggle {
background-color: #91209a;
border-color: #8f4195;
}
.navbar-inverse .navbar-nav>li>a {
color: #fff;
}
.navbar-inverse .navbar-nav>.active>a,
.navbar-inverse .navbar-nav>.active>a:hover,
.navbar-inverse .navbar-nav>.active>a:focus {
color: #fff;
background-color: #91209a;
}
.navbar-inverse .navbar-nav>.open>a,
.navbar-inverse .navbar-nav>.open>a:hover,
.navbar-inverse .navbar-nav>.open>a:focus {
background-color: #91209a;
color: #fff;
}
.navbar-inverse .navbar-nav .open .dropdown-menu>li>a {
color: #fff;
}
.carousel-control i {
position: relative !important;
}
.open>.dropdown-menu {
-webkit-transform: scale(1, 1);
transform: scale(1, 1);
}
.dropdown-menu {
-webkit-transform-origin: top;
transform-origin: top;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-transform: scale(1, 0);
display: block;
transition: all 0.2s ease-out;
-webkit-transition: all 0.2s ease-out;
}
.dropdown .dropdown-toggle:after {
display: none;
}
.navbar-inverse .navbar-nav>li>a {
padding-top: 10px !important;
padding-bottom: 10px !important;
padding-left: 15px !important;
}
.navbar-inverse .navbar-nav .open .dropdown-menu>li>a {
padding-top: 10px !important;
padding-bottom: 10px !important;
padding-left: 25px !important;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<nav class="navbar navbar-inverse sidebarNavigation" data-sidebarClass="navbar-inverse" style="background-color: #904296;border-color:#904296;border-color: #8f4195;position:fixed;top:0px;width: 100%;">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle left-navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" style="color:white;" href="#">My sidebar</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar" style="background-color: #8f4195;border-color:#8f4195;">
<ul class="nav navbar-nav animated">
<li>Home</li>
<li class="dropdown">About <b class="caret"></b>
<ul role="menu" class="dropdown-menu" aria-labelledby="drop2">
<li class="dropdown">About <b class="caret"></b>
<ul role="menu" class="dropdown-menu" aria-labelledby="drop2">
<li role="presentation">Taaaaa</li>
<li role="presentation">Caaaaers</li>
<li role="presentation">aaaaaars</li>
</ul>
</li>
<li role="presentation">Team Bios</li>
<li role="presentation">Customers</li>
<li role="presentation">Careers</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
try this
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body {
font-family: "Lato", sans-serif;
}
/* Fixed sidenav, full height */
.sidenav {
height: 100%;
width: 200px;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #111;
overflow-x: hidden;
padding-top: 20px;
}
/* Style the sidenav links and the dropdown button */
.sidenav a, .dropdown-btn {
padding: 6px 8px 6px 16px;
text-decoration: none;
font-size: 20px;
color: #818181;
display: block;
border: none;
background: none;
width: 100%;
text-align: left;
cursor: pointer;
outline: none;
}
/* On mouse-over */
.sidenav a:hover, .dropdown-btn:hover {
color: #f1f1f1;
}
/* Main content */
.main {
margin-left: 200px; /* Same as the width of the sidenav */
font-size: 20px; /* Increased text to enable scrolling */
padding: 0px 10px;
}
/* Add an active class to the active dropdown button */
.active {
background-color: green;
color: white;
}
/* Dropdown container (hidden by default). Optional: add a lighter background color and some left padding to change the design of the dropdown content */
.dropdown-container {
display: none;
background-color: #262626;
padding-left: 8px;
}
/* Optional: Style the caret down icon */
.fa-caret-down {
float: right;
padding-right: 8px;
}
/* Some media queries for responsiveness */
#media screen and (max-height: 450px) {
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
}
</style>
</head>
<body>
<div class="sidenav">
About
Services
Clients
Contact
<button class="dropdown-btn">Dropdown
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-container">
Link 1
Link 2
Link 3
<button class="dropdown-btn">Dropdown
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-container">
Link 1
Link 2
Link 3
</div>
</div>
Search
</div>
<div class="main">
<h2>Sidebar Dropdown</h2>
<p>Click on the dropdown button to open the dropdown menu inside the side navigation.</p>
<p>This sidebar is of full height (100%) and always shown.</p>
<p>Some random text..</p>
</div>
<script>
/* Loop through all dropdown buttons to toggle between hiding and showing its dropdown content - This allows the user to have multiple dropdowns without any conflict */
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;
for (i = 0; i < dropdown.length; i++) {
dropdown[i].addEventListener("click", function() {
this.classList.toggle("active");
var dropdownContent = this.nextElementSibling;
if (dropdownContent.style.display === "block") {
dropdownContent.style.display = "none";
} else {
dropdownContent.style.display = "block";
}
});
}
</script>
</body>
</html>

Bootstrap navbar toggle not working properly, logo hiding below while in mobile view

I got issues with the boostrap navbar toggle, have been struggling with this for some time now. Firstly, my logo gets hidden below when decreasing window size, like this. It seems the container is too high, but if i decrease it, other content got affected. Next, when i decrease window size, same happens with navigation links, they get below the logo pushing the carousel photo like this. At this point i want the nav links hidden and toggle button to show up.
Lastly, the navigation for mobile view just shows with transparent background and unnecessary top padding as shown in first screenshot.
Relevant HTML:
<div class="navbar navbar-default" data-spy = "affix" data-offset-top = "200" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<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="index-en"><img class = "logo" src = "logo.png" alt = ""></a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a class = "active" href="#">Home</a></li>
<li>About us</li>
<li>Employees</li>
<li>Where we are</li>
</ul>
</div>
</div>
</div>
CSS:
.container{
min-height: 100%!important;
margin: 0 auto!important;
padding: 0 0 0px!important;
}
.navbar-default .navbar-nav > li > a {
color: #4E4F51!important;
text-transform: uppercase!important;
font-family: 'Raleway', sans-serif!important;
font-size: 16px;
text-decoration: none;
margin: 0px 10px;
padding: 10px 10px;
position: relative;
z-index: 0;
cursor: pointer;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #3BB34A!important;
background-color: transparent!important;
}
.navbar-header {
overflow:hidden!important;
}
.logo{
max-height:100%;
}
.navbar-brand {
padding: 0px!important;
height: 140px!important;
}
.navbar-brand>img {
padding: 15px!important;
width: auto!important;
}
.navbar-toggle {
padding: px!important;
margin: 25px 15px 25px 0!important;
}
.navbar {
margin-bottom: 0!important;
}
.navbar-default {
z-index:9999!important;
}
.navbar-default .navbar-nav {
padding-top:50px;
}
.affix{
top: 0;
width: 100%;
-webkit-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
opacity: 0.9;
max-height:140px;
}
.affix-top {
-webkit-transition:padding 1.5s ease-in-out;
-moz-transition:padding 1.5s ease-in-out;
-o-transition:padding 1.5s ease-in-out;
transition:padding 1.5s ease-in-out;
max-height:140px;
}
I would appreciate some suggestions on how to fix this.
Just added new div with fixed height, but it didn't work, logo stayed in it's place, but the toggle button isn't showing.
Here is the sample example for automatically setting the navbar hidden when window size reduced. I this may help.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("span.nav-btn").click(function(){
$("ul.nav").slideToggle();
});
$(window).resize(function(){
if($(window).width()>600)
{
$('ul.nav').removeAttr("style");
}
if($(window).width()<600)
{
$('ul.nav').css('display','none');
}
});
});
</script>
<style>
body{
padding:0px;
margin:0px;
}
.nav{
background:#FF6600;
margin:0px;
list-style:none;
text-align:center;
}
.nav>li{
display:inline-block;
}
.nav>li>a{
text-decoration:none;
font-size:18px;
}
#media (max-width:600px){
.nav{
text-align:left;
}
.nav li{
display:block;
}
.nav-btn{
display:block;
background:#FF6600;
font-size:20px;
cursor:pointer;
}
.nav-btn:before{
content:"Menu";
}
}
</style>
</head>
<body>
<nav>
<span class="nav-btn"></span>
<ul class="nav" style="display:block;">
<li>HOme</li>
<li>About Us</li>
<li>Products</li>
<li>Contact</li>
</ul>
</nav>
</body>
</html>

Two DIVs on the same place

My "search box and social icons" are hidden behind my main-menu. This is probably because of my .hide-menu class. I have a jQuery plugin that makes the main-menu appear when scrolling-up and makes it disappear when scrolling-down.
What I want to achieve is that the "search box and social icons" DIV show always and below the main-menu. Is this possible?
My FIDDLE... FIDDLE LINK HERE
.navbar-default .navbar-nav > .active > a,.navbar-default .navbar-nav > .active > a:focus,.navbar-default .navbar-nav > .active > a:hover {
color: #fff;
}
.menu-container {
background-color: #fff;
border-bottom: 1px solid #000;
border-top: 1px solid #000;
min-height: 20px;
position: relative;
}
.navbar-nav a:hover {
color: #000;
}
.navbar-nav a:link {
font-size: 12px;
font-family: 'century schoolbook';
color: #000;
/*text-decoration: overline;
text-decoration-color: #A10000*/
}
.brand-name a {
text-decoration: none;
}
.brand-name img {
max-width: 137px;
padding: 8px;
/*position:absolute;*/
left: 0;
}
ul {
list-style-type: none;
}
.navbar-form input,.form-inline input {
width: auto;
}
#nav.affix {
position: fixed;
top: 0;
width: 100%;
z-index: 10;
}
#sidebar.affix-top {
position: static;
}
#sidebar.affix {
position: fixed;
top: 80px;
}
.navbar-default .navbar-nav > li > a {
color: #A10000;
font-family: 'LuzSans-Book';
font-size: 15px;
font-weight:bold
}
.navbar-default .navbar-nav > li > a:hover {
background-color: #A10000;
color: #000;
margin-top:4px;
margin-bottom:4px;
}
.navbar-default .navbar-nav > .active > a {
background-color: #000;
margin-top:4px;
margin-bottom:4px;
}
.navbar-custom-social {
height: 15px;
float: right;
clear: none;
margin-right: 25px;
}
.navbar-fixed-top {
padding-top: 0;
}
#search-social {
margin-bottom:20px
}
header.site_header {
box-shadow: 0 1px 6px rgba(0,0,0,.35);
width: 100%;
top: 0;
left: 0;
position: fixed;
z-index: 999;
-webkit-transition: top .5s;
transition: top .5s;
background-color: #fff;
}
header.site_header.hide-menu {
top: -90px;
}
<header class="site_header root" id="nav">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="navbar navbar-default navbar-static">
<!-- <div class="clearfix container navbar-fixed-top"> -->
<div class="clearfix menu-container">
<div class="pull-right clearfix toggle_btn_wrap">
<a class="navbar-toggle" data-target=
".navbar-collapse" data-toggle="collapse" href=
"#"><i class="fa fa-bars"></i></a>
</div>
<div class="pull-left brand-name">
<a href="#"><img alt="NAME" src=
"/images/LOGO.png"></a>
</div>
<div class="clearfix prevent-float"></div>
<div class="navbar-collapse collapse">
MENU ITEMS
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<div id="search-social" class="container">
<div class="row">
<div class="col-sm-12">
<div class="navbar navbar-default navbar-static">
<div class="clearfix search_and_social">
<div class="clearfix navbar navbar-custom-search">
SEARCH BOX
</div>
<div class="clearfix navbar navbar-custom-social">
SOCIAL ICONS
</div>
</div>
</div>
</div>
</div>
</div>
Easiest is probably to use sibling selector between .site_header and #search-social. Make sure that #search-social is positioned. Something like:
#search-social {
margin-bottom: 20px;
position: relative;
}
header.site_header ~ #search-social {
top: 40px;
}
header.site_header.hide-menu ~ #search-social {
top: 0px;
}
Example (with a testbutton): https://jsfiddle.net/7f6q75h8/2/
Note: Top styling needs some adjustment depending on the menu height.
Maybe you can use position:absolute;
Else you can add a class on the wrapper when you wanna show or hide something.
.wrapper .active .div2{
display:block;
}
I don't know if this is what you want but may lead you in right direction. just added a jquery function to determine the state when menu bar is visible,
function adjustMenu() {
if (!$('#nav').hasClass('hide-menu')) {
$('#search-social').css('margin-top', $('#nav').height() + 'px');
} else {
$('#search-social').css('margin-top', '0px');
}
}
this function is called on page load as well as inside the onscroll event of page
$(window).scroll(function() {
adjustMenu();
});
here is the updated fiddle
there are better ways if you can edit in the plugin code you are using.

Search form vertically fills navbar

I'm trying to put a search form inline within a navbar like so:
But I end up with a navbar like this:
What I'm trying to do is have the green search bar vertically fill the whole navbar. But when I add more padding, the navbar gets more padding also. How can I do it so that the search bar fills the whole navbar like in the first example?
EDIT
Here is the Bootply with static html: http://www.bootply.com/6UyH4u0NWy#
This might get you headed in the right direction using .form-control to set the height of the input.
/* CSS used here will be applied after bootstrap.css */
/* nav */
.navbar-inverse .navbar-nav li a {
padding-top: 15px;
padding-left: 15px;
}
.navbar.navbar-inverse {
background: white;
border-bottom: solid 1px #979797;
}
.navbar-inverse .nav > li > a {
color: #858585;
font-weight: 500;
font-size: 13.5px;
}
.navbar-inverse .nav > li > a:hover,
.navbar .nav > li > a:focus {
color: black;
-webkit-transition: ease 0.2s;
transition: ease 0.2s;
}
.navbar-inverse .navbar-collapse {
border-top: none;
text-align: center;
#media (max-width: 767px) {
background-color: white;
}
}
.navbar-header h4 {
padding: 5px 0 0 10px;
}
.navbar-nav li .search-box {
height: 100%;
margin-top: none;
background-color: #38A6A6;
border: none;
color: white;
border-radius: 0;
padding-left: 15px;
padding-right: 15px;
padding-bottom: none;
}
.navbar-nav li input.search-query {
height: 100%;
padding-left: 26px;
}
.navbar-nav li form.form-search {
height: 100%;
position: relative;
}
.navbar-nav li form.form-search:before {
height: 100%;
display: block;
width: 14px;
height: 14px;
content: "\e003";
font-family: 'Glyphicons Halflings';
color: white;
background-position: -48px 0;
position: absolute;
top: 16px;
left: 8px;
z-index: 1000;
}
.navbar-nav li .form-control {
height: 50px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<nav class="navbar navbar-fixed-top navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<h4>Brand</h4>
</div>
<ul class="nav navbar-nav navbar-right">
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
<li>Link
</li>
<li>
<form class="form-search form-inline">
<input type="text" class="search-box form-control" placeholder="Recipient's username" aria-describedby="basic-addon2" />
</form>
</li>
</ul>
</div>
</nav>
How about setting the height of .form-search to 100% ? The reason it has this current height is because its scale depends on its content (height:auto by default).
Also notice you got syntax errors in your html (closing li tag before closing form tag).

I can't remove bottom white portion of my website

I have made a website for my fake business but I can't get the area at the bottom of the page not to be there. So further information, I want the whole page to take up all of the browser window and not have any white space or have any scrolling on all computers, and on computers where the screen is taller or shorter i want the text to stay in the center between the navbar and end of page.
Demo here.
Thanks in advance.
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Geer Creations</title>
<!-- Icon -->
<link rel="shortcut icon" href="logo-inverse.ico" >
<!-- Fonts -->
<link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700' rel='stylesheet' type='text/css'>
<!-- Bootstrap core CSS -->
<link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles -->
<link href="main.css" rel="stylesheet">
</head>
<body>
<div class="page">
<div class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<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 style="max-width:50px; margin-top: -7px;" src="http://i1284.photobucket.com/albums/a579/Ian_Geer/logo-inverse_zps3767ce84.png"></a>
</div>
<div class="collapse navbar-collapse" id=".navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li class="active">Home</li>
<li>Browse</li>
<li>Contact</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>Sign Up</li>
<li>Login</li>
</ul>
</div>
</div>
</div>
</div>
<div class="jumbotron">
<div class="container">
<h1>We combine strategy, creative thinking, & technology to drive results.</h1>
<button type="button" class="btn btn-default btn-lg">Learn More</button>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
</body>
</html>
CSS:
body {
font-family: 'Ubuntu', sans-serif;
}
.navbar {
background-color: #fff;
border: none;
padding-top: 10px;
}
.navbar .nav {
margin-top: 5px;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #ff9721;
background-color: #fff;
font-weight: 700;
}
.navbar-default .navbar-nav > li > a {
-webkit-transition: color .2s; /* For Safari 3.1 to 6.0 */
transition: color .2s;
color: #6E6E6E;
background-color: transparent;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
-webkit-transition: color .2s; /* For Safari 3.1 to 6.0 */
transition: color .2s;
color: #ff9721;
background-color: transparent;
}
h1 {
color: #fff;
text-align: center;
}
.jumbotron {
padding-top: 190px;
padding-bottom: 173px;
margin-right: auto;
margin-left: auto;
width: 100%;
background-color: #170D00;
color: #fff;
text-align: center;
}
.jumbotron h1 {
font-size: 3em;
}
.form-control {
margin-top: 5px;
border-radius: 20px;
}
.btn {
-webkit-transition: color .5s, border .5s; /* For Safari 3.1 to 6.0 */
transition: color .5s, border .5s;
margin-top: 50px;
color: #fff;
background-color: transparent;
border: 2px solid #fff;
width: 220px;
}
.btn:hover,
.btn:focus {
-webkit-transition: color .5s, border .5s; /* For Safari 3.1 to 6.0 */
transition: color .5s, border .5s;
margin-top: 50px;
color: #ff9721;
background-color: transparent;
border: 2px solid #ff9721;
width: 220px;
}
You have a 30px margin from the bottom of your .jumbotron div. Add to your .jumbotron CSS class:
margin-bottom: 0;
to remove it.
Example
If you need screen to be not scrollable then you can use,and provide height to the "body" position:fixed; which fixes the screen exactly what you need, but if you need scrollable website with bottom space covered, use margin-bottom:0; you have given padding-bottom, here is the css
.jumbotron {
padding-top: 190px;
padding-bottom: 173px;
margin-right: auto;
margin-left: auto;
width: 100%;
background-color: #170D00;
color: #fff;
text-align: center;
margin-bottom:0;
}
you can even try position:fixed, even that will help using on all browsers