Align and center various elements in a Bootstrap 'row' - css

Been having difficulty trying to center vertically a Font Awesome icon, a 2 text line div, and 2 more icons in the same Bootstrap row div. I managed to fake the needed outcome but after hours trying out numerous CSS properties I'd love to hear what the best solutions was.
So the items I need to position vertically centered so those stay that way regardless of the containing element size are the 'fa fa-building-o fa-4x' icon, the 2 lines of text to its right ("X5 Retail Group" and "Company address and contacts"), both are of different font size (which I attempted to achieve with <h5> and <h3> tags), and the 2 icons to the right.
It was not required to make the sections of a certain height. The line-height property contains a number convenient to me at the moment.
The code was designed for Firefox 39.
Here's a Plunkr link to my html: https://plnkr.co/edit/0BVnHFowRD53KOVoy1KU?p=preview
Below is the .html of the page.
body {
padding-top: 20px;
}
section#top1 {
line-height: 40px;
}
section#top2 {
line-height: 80px;
}
.monitoring {
background-color: #E8E8E8;
}
.monitoringh4 {
display: inline;
}
.h4buttonlike:hover {
cursor: pointer;
font-weight: bold;
}
section#top3 {
line-height: 60px;
}
section#top4 {
line-height: 80px;
}
.container {
border: 1px solid #ccc;
border-radius: 4px;
margin-bottom: 5px;
}
.container .col-md-12 {
background: #e6e6e6;
border-radius: 4px;
}
.container .logo {
display: inline;
margin: auto 0 auto 0;
width: 80px;
}
.container h4 {
font-size: 1.0em;
display: inline;
margin-left: 5px;
text-align: center;
}
section#top1 .container ul {
display: table;
margin: auto 0;
float: right;
}
section#top1 .container ul li {
display: table-cell;
padding-right: 15px;
}
.settings i {
vertical-align: middle;
}
.container i {
margin-right: 5px;
}
.dropdown {
display: inline;
margin-left: 5px;
margin-top: 3px;
}
.myclass {
text-align: right;
}
section#top4 .brands {
position: absolute;
top: 50%;
display: inline-block;
/* margin-left: 20px; */
transform: translate(5%, -55%);
}
.exp {
height: 56px;
width: 44px;
display: inline-block;
text-align: center;
vertical-align: middle;
}
.my-icons {
position: absolute;
top: 50%;
right: 15px;
transform: translate(-60%, -50%);
display: inline-block;
}
<!-- Bootstrap core CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<section id='top1'>
<div class='container'>
<div class='row'>
<div class='col-md-12'>
<img class='logo' src='http://www.toennies.com/uploads/pics/fTRACE-Logo_02.png'>
<h4>Company name</h4>
<ul>
<li>Total items: 100</li>
<li style='color: #009900;'>Oline: 82</li>
<li style='color: #787878;'>Offline: 16</li>
<li style='color: #FF0000;'>Damaged: 6</li>
</ul>
</div>
<div class='clearfix'></div>
</div>
</div>
</section>
<section id='top2'>
<div class='container'>
<div class='row'>
<div class='col-md-9 monitoring'>
<div class='monitoringh4'>
<h4>Monitoring</h4>
</div>
<div class="dropdown">
<h4 class="dropdown-toggle h4buttonlike" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Reports
<span class="caret"></span>
</h4>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li>Report 1
</li>
<li>Report 2
</li>
<li>Report 3
</li>
</ul>
</div>
<div class="dropdown">
<h4 class="dropdown-toggle h4buttonlike" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Tune
<span class="caret"></span>
</h4>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li>Tune 1
</li>
<li>Tune 2
</li>
<li>Tune 3
</li>
</ul>
</div>
</div>
<div class='col-md-3 monitoring'>
<div class="dropdown">
<h4 class="dropdown-toggle h4buttonlike" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
John Doe (Admin)
<span class="caret"></span>
</h4>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li>Jane Doe
</li>
<li>Jack Doe
</li>
<li>Jimmy Doe
</li>
</ul>
</div>
</div>
</div>
</div>
</section>
<section id='top3'>
<div class='container'>
<div class='row'>
<div class='col-md-12 settings'>
<h4><i class="fa fa-desktop fa-2x"></i>Tuneup > Company profile > X5 Retail Group</h4>
</div>
</div>
</div>
</section>
<section id='top4'>
<div class='container'>
<div class='row'>
<div class='col-md-12'>
<div class='exp'><i class="fa fa-building-o fa-4x"></i>
</div>
<div class='brands'>
<h3>X5 Retail Group</h3>
<h5>Company address and contacts</h5>
</div>
<div class='my-icons'>
<h5><i class="fa fa-pencil-square-o"> Edit</h5>
</i>
<h5><i class="fa fa-print"></i>Print</h5>
</div>
</div>
</div>
</div>
</section>
Thank you.

Related

How can I add a footer to a flex-container?

I'm trying to add a bootstrap footer to my project. It works well on the big screen but when you start scaling down the screen, the footer is placed in the middle of the page instead of the bottom. What am I doing wrong?
#media only screen and (max-width: 1150px) {
body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
}
<div class="bigcontainer">
<div class="box1">
<h3>RENOVATIONS</h3>
<p><br /></p>
<p>
At <em>Razca Designs</em>, we specialize in interior renovation design, from small kitchen updates to complete home remodels. We have a wealth of experience and expertise in creating personalized spaces that reflect our clients’ unique styles and
personalities.
</p>
<p><br /></p>
<p>
Our team will work closely with you every step of the way to bring your project to completion. We take the time to fully understand the specific challenges and pain points of each client in their current home, and use this information to design a tailor-made
solution that addresses each individual need. Our approach is to provide you with a beautiful and functional home that you’ll love spending time in
</p>
<p><br /></p>
<b><em>Our passion is creating personalized, welcoming spaces that are tailored to you and your family. With Razca Designs, you can trust us to transform your home into a space that exceeds your expectations</em></b>
</div>
<div class="box2">
<img src="textimages/reno10.jpg" alt="" class="img-fluid" />
</div>
<div class="box3">
<img src="textimages/renov-3.jpg" alt="" class="img-fluid" />
<img src="textimages/ren101.jpg" alt="" class="img-fluid" />
</div>
<div class="box4">
<h3>RENOVATIONS</h3>
<p><br /></p>
<ul class="ab">
<li>
Reviewing permits or managing permit applications if necessary
</li>
<li>reate the neceesary drawings, including:</li>
<p>Existing and demolition plans</p>
<p>Proposed plans</p>
<p>Construction plans</p>
<p>Electrical plans.</p>
<p>Furniture Plans</p>
<li>
Providing materials and finishes according to your design palette
</li>
<li>Design of custom furniture</li>
<li>Requesting quotes; ordering and coordinating deliveries</li>
<li>Dealing contractors and craftsmen</li>
<li>Dealing with suppliers and overseeing quality control</li>
<li>
Final design steps, like finishes and confirming forniture and cabinetery.
</li>
</ul>
</div>
</div>
<!-- Footer -->
<footer class="text-center text-lg-start bg-white text-muted">
<!-- Section: Social media -->
<section class="d-flex justify-content-center justify-content-lg-between p-4 border-bottom">
<!-- Left -->
<div class="me-5 d-none d-lg-block">
<span>Get connected with us on social networks:</span>
</div>
<!-- Left -->
<!-- Right -->
<div>
<a href="" class="me-4 link-secondary">
<i class="fab fa-facebook-f"></i>
</a>
<a href="" class="me-4 link-secondary">
<i class="fab fa-twitter"></i>
</a>
<a href="" class="me-4 link-secondary">
<i class="fab fa-google"></i>
</a>
<a href="" class="me-4 link-secondary">
<i class="fab fa-instagram"></i>
</a>
<a href="" class="me-4 link-secondary">
<i class="fab fa-linkedin"></i>
</a>
<a href="" class="me-4 link-secondary">
<i class="fab fa-github"></i>
</a>
</div>
<!-- Right -->
</section>
<!-- Section: Social media -->
<!-- Section: Links -->
<section class="">
<div class="container text-center text-md-start mt-5">
<!-- Grid row -->
<div class="row mt-3">
<!-- Grid column -->
<div class="col-md-3 col-lg-4 col-xl-3 mx-auto mb-4">
<!-- Content -->
<h6 class="text-uppercase fw-bold mb-4">
<i class="fas fa-gem me-3 text-secondary"></i>Company name
</h6>
<p>
Here you can use rows and columns to organize your footer content. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
</p>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-2 col-lg-2 col-xl-2 mx-auto mb-4">
<!-- Links -->
<h6 class="text-uppercase fw-bold mb-4">Products</h6>
<p>
Angular
</p>
<p>
React
</p>
<p>
Vue
</p>
<p>
Laravel
</p>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-3 col-lg-2 col-xl-2 mx-auto mb-4">
<!-- Links -->
<h6 class="text-uppercase fw-bold mb-4">Useful links</h6>
<p>
Pricing
</p>
<p>
Settings
</p>
<p>
Orders
</p>
<p>
Help
</p>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-4 col-lg-3 col-xl-3 mx-auto mb-md-0 mb-4">
<!-- Links -->
<h6 class="text-uppercase fw-bold mb-4">Contact</h6>
<p>
<i class="fas fa-home me-3 text-secondary"></i> New York, NY 10012, US
</p>
<p>
<i class="fas fa-envelope me-3 text-secondary"></i> info#example.com
</p>
<p>
<i class="fas fa-phone me-3 text-secondary"></i> + 01 234 567 88
</p>
<p>
<i class="fas fa-print me-3 text-secondary"></i> + 01 234 567 89
</p>
</div>
<!-- Grid column -->
</div>
<!-- Grid row -->
</div>
</section>
<!-- Section: Links -->
<!-- Copyright -->
<div class="text-center p-4" style="background-color: rgba(0, 0, 0, 0.025)">
© 2021 Copyright:
<a class="text-reset fw-bold" href="https://mdbootstrap.com/">MDBootstrap.com</a>
</div>
<!-- Copyright -->
</footer>
<!-- Footer -->
<!-- Carousel wrapper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</body>
Here is my screen shot
I was able to figure out what I was doing wrong
.bigcontainer {
display: flex;
flex-wrap: wrap;
width: 98vw;
align-items: center;
margin: 20px;
font-family: "sans";
margin-left: 150px;
}
.bigcontainer::after {
width: 98vw;
position: absolute;
z-index: -1;
right: 0;
}
.bigcontainer > div {
width: 50%;
height: 50%;
padding: 18px;
}
.box1 {
margin-bottom: 20px;
}
.box3 {
display: flex;
gap: 10px;
}
.box3 img {
width: 45%;
height: 30rem;
}
.box2 img {
width: 70%;
}
#media screen and (max-width: 908px) {
.bigcontainer > div {
width: 100%;
height: max-content;
flex: 0 0 100%;
}
.bigcontainer {
display: flex;
flex-wrap: wrap;
width: 98vw;
align-items: center;
margin: 20px;
font-family: "sans";
padding: 15;
margin-left: 0;
margin-top: 150px;
}
.text-container {
width: auto;
margin-bottom: auto;
}
.testing {
width: auto;
margin: auto;
}
.box2 {
order: 4;
}
.box2 img {
width: 100%;
height: 100%;
}
.box3 {
flex-wrap: wrap;
}
.box3 img {
width: 100%;
}
.box2 img {
width: 100%;
}
.bigcontainer::after {
display: none;
}
}
.box1 {
font-family: "sans";
line-height: 150%;
}
.box4 {
font-family: "sans";
line-height: 150%;
}
h3 {
font-size: 18px;
font-weight: bolder;
}
.box4 h3 {
padding-left: 15px;
}
.imge-4 {
width: 100px;
}
.dropdown:hover .dropdown-menu {
display: block;
margin-top: 0; /* remove the gap so it doesn't close */
}
.text-container {
width: 600px;
margin-bottom: 90px;
}
.testing {
width: 600px;
margin-left: 20px;
}
#media screen and (max-width: 568px) {
.bigcontainer > div {
width: 100%;
height: max-content;
flex: 0 0 100%;
}
.bigcontainer {
display: flex;
flex-wrap: wrap;
width: 98vw;
align-items: center;
margin: 20px;
font-family: "sans";
padding: 15;
margin-left: 0;
margin-top: 150px;
}
.testing {
width: auto;
margin: auto;
}
.text-container {
width: auto;
margin-bottom: auto;
}
.box2 {
order: 4;
}
.box2 img {
width: 100%;
height: 100%;
}
.box3 {
flex-wrap: wrap;
}
.box3 img {
width: 100%;
}
.box2 img {
width: 100%;
}
.bigcontainer::after {
display: none;
}
}

Style issues with b-collapse and css

what I am trying to do is modify the style of my b-collapse since by default it has a vertical style that I think and what I want is to give my menu a horizontal style
This is how I implement it:
<div style="background-color:white;">
<b-collapse id="collapse-cat-lvl1-469">
<div data-cat-acc="473" class="grid-item parent-lvl-2">
<a class="link -1 grid-sty-1" href="#" target="_self" data-menu-item-id="473">
<span class="text">GTI</span>
</a>
</div>
<div data-cat-acc="474" class="grid-item parent-lvl-2">
<a class="link sty-1 grid-sty-1" href="#" target="_self" data-menu-item-id="474">
<span class="text">Pets</span>
</a>
</div>
</b-collapse>
</div>
You can modify <b-collapse id = "collapse-cat-lvl1-469"> in if this: collapse-cat-lvl1-469 ???
What I intend is to give it better style with CSS, or some way that I can see my menu horizontally and not vertically
.navbar-greetings, .login-section{display: none}
#menu-header.collapse:not(.show){
display: block;
}
#menu-header{
position: fixed;
top: 25px;
max-width: 83%;
margin: 0 auto;
left: 8.32%;
.panel{
button{
display: block;
color: white;
font-size: 13px;
font-family: 'VWHead-Bold';
}
}
#accordion-mbl-menu{
display: flex;
}
}

How to remove this space AFTER inline-block?

I can't figure where this space is coming from (marked in red in attached image)? Any pointers?
This is a 'Coming soon' page with mainly a masthead and a mastfoot, and some social links positioned differently if on mobile or desktop. I'm having problems with the mobile view.
This is the relevant HTML:
<div class="masthead">
<div class="masthead-bg"></div>
<div class="container h-100">
<div class="row h-100">
<div class="col-12 my-auto">
<div class="masthead-content text-white py-5 py-md-0">
<h1 class="mb-3">Register</h1>
<p class="mb-5">Building a X.
We're building X for you. <strong>Request an invitation for early access using the form below!</strong></p>
<form action="https://hen.us18.list-manage.com/subscribe/post" method="POST" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank">
<input type="hidden" name="u" value="377b993ba697354f6584371c9">
<input type="hidden" name="id" value="e1c7ba1f4b">
<div class="input-group input-group-newsletter">
<input type="email" autocapitalize="off" autocorrect="off" name="MERGE0" id="MERGE0" size="25" value="" class="form-control" placeholder="Enter your email..." aria-label="Enter email..." aria-describedby="basic-addon">
<div class="input-group-append">
<button class="btn btn-secondary" type="submit">Notify Me!</button>
</div>
<input type="hidden" name="ht" value="f5b0455009025ab4743b2ecc932316028905c673:MTUzMTgyNjMzMC43NDM3">
<input type="hidden" name="mc_signupsource" value="hosted">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="mastfoot">
<div class="inner-mastfoot">
© 2018 X Ltd. All Rights Reserved. •
Legal
• Contact
</div>
</div>
<div class="social-icons">
<ul class="list-unstyled text-center mb-0">
<li class="list-unstyled-item">
<a href="#">
<i class="fa fa-envelope"></i>
</a>
</li>
<li class="list-unstyled-item">
<a href="#">
<i class="fa fa-twitter"></i>
</a>
</li>
<li class="list-unstyled-item">
<a href="#">
<i class="fa fa-medium"></i>
</a>
</li>
<li class="list-unstyled-item">
<a href="#">
<i class="fa fa-linkedin"></i>
</a>
</li>
<li class="list-unstyled-item">
<a href="#">
<i class="fa fa-instagram"></i>
</a>
</li>
<li class="list-unstyled-item">
<a href="#">
<i class="fa fa-facebook"></i>
</a>
</li>
</ul>
</div>
and the relevant CSS:
.masthead .masthead-bg {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
width: 100%;
min-height: 35rem;
height: 100%;
background-color: rgba(0, 46, 102, .8);
transform: skewY(4deg);
transform-origin: bottom right
}
.social-icons {
position: absolute;
margin-bottom: 2rem;
width: 100%;
z-index: 2
}
.social-icons ul {
margin-top: 2rem;
width: 100%;
text-align: center
}
.social-icons ul>li {
margin-left: .75rem;
margin-right: .75rem;
display: inline-block
}
.social-icons ul>li>a {
display: block;
color: #fff;
background-color: rgba(0, 46, 102, .8);
border-radius: 100%;
font-size: 1rem;
line-height: 2rem;
height: 2rem;
width: 2rem
}
.mastfoot {
color: #262626;
color: rgba(26, 26, 26, .5);
position: absolute;
bottom: 10px;
width: 100%;
margin-left: auto;
margin-right: auto;
z-index: 2
}
.inner-mastfoot {
font-size: 0.8rem;
text-align: center
}
So far as I can tell - in this case, on desktop by resizing my window to be as thin as a mobile screen - it's because your content isn't tall enough to fill the screen.
Image: https://i.stack.imgur.com/9Cmyr.png
Your mystery space is just the height of the <body>, unfilled by content.

.nav-tabs behaving inappropriate when .navbar-brand is assigned to its sibling element

I have commented out the bug(with #characters) in the navigation part of the code where I am getting the issue. Try removing the .navbar-brand as mentioned in the comment and you will get to see.
I'm curious to know that what's happening under the hood when navbar-brand is assigned to its(element with .nav-tabs) adjacent element which conflicting with it
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<meta name="author" content="NeelDUnstoppable" />
<meta name="description" content="A rough template for html page created just for enhancing and getting a precise grip over the rules" />
<title>html template</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="css/main.css" rel="stylesheet" />
</head>
<body>
<div class="nav" role="navigation">
<!-- ######## Remove the .navbar-brand class from the below <a> element and the .nav-tabs class in <ul> element works completely fine ######### -->
Blasting off with bootstrap
<ul class="nav nav-tabs">
<li role="presentation" class="active">Tickets</li>
<li role="presentation">Stations</li>
<li role="presentation">About</li>
</ul>
</div>
<div class="container">
<div class="row well well-lg">
<div class="col-md-6">
<h2>The Fastest way to space</h2>
<p class="lead">Make your way to space in the comfort of your own rocket, elevator or transporter.</p>
<button type="button" class="btn btn-lg btn-default">Take the Tour</button>
<button type="button" class="btn btn-lg btn-primary">Book Tickets Now</button>
</div>
<div class="col-md-6 hidden-sm hidden-xs">
<img src="images/img-header.jpg" alt="Blasting off" title="Blasting off image"/>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row text-center features">
<div class="col-sm-4 col-xs-10 col-xs-offset-1 col-sm-offset-0">
<i class="glyphicon glyphicon-briefcase"></i>
<h3>Book Today</h3>
<p>Even if you're traveling tomorrow, you can still get tickets today. We have a number of conveniently located ports around teh globe to service everyone</p>
</div>
<div class="col-sm-4 col-xs-6">
<i class="glyphicon glyphicon-random"></i>
<h3>Go Anywhere</h3>
<p>If you need to get to space today, why not try out a transporter? Despite the claims, there are have been no deaths in the last 6weeks!</p>
</div>
<div class="col-sm-4 col-xs-6">
<i class="glyphicon glyphicon-send"></i>
<h3>RocketBus®</h3>
<p>For cheapest fares, catch the next RocketBus® to the stars. Cheaper on you wallet, and easiest way to make friends</p>
</div>
</div>
</div>
<div class='footer'>
<div class='container'>
<div class='row'>
<div class='col-sm-4 col-md-3 col-xs-6'>
<h4>Who We Are</h4>
<p><i>Blasting Off With Bootstrap</i> is the fastest way to space. <a href='#'>Book your ticket today</a>!</p>
<p><a href='#'>More About Us <i class='glyphicon glyphicon-arrow-right'></i></a></p>
</div>
<div class='col-sm-2 col-xs-6 col-md-offset-1'>
<h4>Links</h4>
<ul class='list-unstyled'>
<li><a href='#'>Home</a></li>
<li><a href='#'>Tickets</a></li>
<li><a href='#'>Stations</a></li>
</ul>
</div>
<div class='clearfix visible-xs'></div>
<div class='col-sm-2 col-xs-6'>
<h4>Stay in Touch</h4>
<ul class='list-unstyled'>
<li><a href='#'>About</a></li>
<li><a href='#'>Contact Us</a></li>
<li><a href='#'>Blog</a></li>
<li><a href='#'>Twitter</a></li>
<li><a href='#'>Facebook</a></li>
</ul>
</div>
<div class='col-sm-4 col-md-3 col-md-offset-1 col-xs-6'>
<h4>Contact Us</h4>
<ul class='list-unstyled'>
<li><i class='glyphicon glyphicon-globe'></i> Orlando, FL<li>
<li><i class='glyphicon glyphicon-phone'></i> 1-555-blast-off<li>
<li><i class='glyphicon glyphicon-envelope'></i> <a href='mailto:#'>blastingoff#codeschool.com</a><li>
</ul>
<p>Blasting Off With Bootstrap ©2214.</p>
</div>
</div>
</div>
</div>
<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.7/js/bootstrap.min.js"> </script>
</body>
</html>
The related .css file:
.features .glyphicon {
font-size: 32px;
}
.row {
margin-bottom: 20px;
}
.quote {
background-color: #444;
color: #e1e1e1;
}
.quote blockquote {
border: none;
margin: 0;
}
.quote footer {
color: #c1c1c1;
}
section, header {
background-color: #fff;
}
body {
}
.footer {
padding: 20px 0;
}
/*
#demo-nav {
display: none;
}
.show-nav #demo-nav {
display: block;
}
*/
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 200px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 200px;
}
.footer {
color: #efefef;
background-color: #333;
}
.footer a {
color: #9af7fe;
}
#media only screen and (max-width: 768px) {
body { margin-bottom: 400px; }
.footer { height: 400px; }
}

Bootstrap navbar appears differently in Firefox and Chrome due to browser rendering inconsistencies

The screenshot below is my bootstrap navbar which works nicely (pills disappear one by one as per spec). However when scaled down to various screen sizes, the navbar is no longer in-line and becomes staggered.
The issue is worse in Chrome than in Firefox because the left hand section of the navbar does not sit at the top of the screen.
If I can get Chrome to look like the Firefox screenshot, this will help me fix the remaining issues.
Can anyone suggest which browser rendering inconsistency would explain why on the Chrome version, the left hand portion of the navbar does not sit flush with the top of the screen?
Top is Chrome, bottom is FireFox.
<header>
<div class="vr-nav-container" data-ng-controller="navBarController">
<div>
<div class="col vr-nav-col1">
<div class="nowrap">
<nav class='navbar navbar-default navbar-static-top no-padding" role="navigation"'>
<a class='navbar-brand' href='/Default'>
<img height="30" class="logo" alt="Flatty" src="/Assets/images/logo-small-rocket-lg.png" />
<img height="30" id="xs-toggler" class="logo-xs" alt="Flatty" src="/Assets/images/logo_xs.png" />
</a>
</nav>
</div>
</div>
<div class="col vr-nav-col2 fill center">
<div class="nowrap">
<nav class='navbar navbar-default navbar-static-top " role="navigation"'>
<div class="tabbable ">
<ul class="nav nav-pills contrast-background">
<li data-ng-repeat="item in NavBarViewModel">
<a href="{{item.Path}}"><i class="{{item.Icon}}"></i>
{{item.Title}}
</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
<div class="col vr-nav-col3">
<div class="nowrap">
<nav class='navbar navbar-default navbar-static-top" role="navigation"'>
<ul class='nav'>
<li ng-controller="awardBoxController" class='dropdown medium only-icon widget'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>
<i class='icon-trophy'></i>
<div class='label'>{{AwardSummary.TotalPoints}}</div>
</a>
<ul class='dropdown-menu'>
<li>
<div class="box-content box-statistic">
<h3 class="title text-error">{{AwardSummary.Level}}</h3>
<small>{{AwardSummary.TotalPoints}} points</small>
<div class="text-banana icon-trophy align-right"></div>
</div>
</li>
<li><a href="/#/Awards/My-Points/">
<div class='points-history box-content widget-body'>
<div class='pull-left icon'>
<i class='icon- text-banana'></i>
</div>
<div class='pull-left text'>
<span><strong>Point History</strong> <span class="see-all">- see all</span></span>
<small class='text-muted'>{{award.AcheivedDate}}</small>
</div>
</div>
</a></li>
<li ng-repeat="award in AwardSummary.Awards">
<a href='#'>
<div class=' box-content widget-body'>
<div class='pull-left icon'>
<i class='icon-{{award.Icon}} text-success'></i>
</div>
<div class='pull-left text'>
{{award.Name}}
<span class="text-muted">+{{award.Points}}</span>
<small class='text-muted'>{{award.AcheviedDate| fromNow}}</small>
</div>
</div>
</a>
</li>
<li class='divider'></li>
<li class='widget-footer'>
<a href='/#/Awards/High-Scores/'>High Scores</a>
</li>
</ul>
</li>
<li class='dropdown medium user-menu'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>
<img width="23" height="23" src="/Assets/images/avatar.jpg" />
<span class='user-name'>
<asp:Literal ID="UserFirstNameLiteral" runat="server" meta:resourcekey="UserFirstNameLiteral">FirstName LastName</asp:Literal></span>
<b class='caret'></b>
</a>
<ul class='dropdown-menu'>
<li>
<a href='/UserAccount/UserProfile'>
<i class='icon-user'></i>
<%= this.GetGlobalResourceObject("MasterPage","Profile") %>
</a>
</li>
<li>
<a ng-if="ShowSettings" href='/Settings/Dashboard'>
<i class='icon-cog'></i>
<%= this.GetGlobalResourceObject("Resources","Settings") %>
</a>
</li>
<li>
<a ng-if="ShowSettings" href='http://todo.help.vr.zendeskurl.com'>
<i class='icon-bullhorn'></i>
<%= this.GetGlobalResourceObject("MasterPage","GetHelp") %>
</a>
</li>
<li class='divider'></li>
<li>
<form runat="server">
<asp:LinkButton ID="SignOutLinkButton" runat="server" OnClick="SignOutLinkButton_Click" meta:resourcekey="SignOutLinkButton">
<i class='icon-signout'></i> <%= this.GetGlobalResourceObject("Resources","SignOut") %>
</asp:LinkButton>
</form>
</li>
</ul>
</li>
</ul>
<div class='navbar-form navbar-right hidden-xs'>
<button class='btn btn-link dropdown-toggle' style="top: 4px;" name='button' data-toggle="dropdown" type='submit'><i class="icon-search"></i><span class="caret"></span></button>
<ul class="dropdown-menu">
<li>
<a category="" class="searchoption" href="#"><%= this.GetGlobalResourceObject("MasterPage","Everything") %></a>
</li>
<li class="divider"></li>
<li>
<a category="Deals" class="searchoption" href="#"><%= this.GetGlobalResourceObject("Resources","Deals") %></a>
</li>
<li>
<a category="Contacts" class="searchoption" href="#"><%= this.GetGlobalResourceObject("Resources","Contacts") %></a>
</li>
<li>
<a category="Accounts" class="searchoption" href="#"><%= this.GetGlobalResourceObject("Resources","Accounts") %></a>
</li>
<li>
<a category="Tasks" class="searchoption" href="#"><%= this.GetGlobalResourceObject("Resources","Tasks") %></a>
</li>
</ul>
<div class='form-group'>
<input value="" id="searchBox" class="form-control" placeholder='<%= this.GetGlobalResourceObject("Resources","Search") %>...' autocomplete="off" id="q_header" name="q" type="text" />
</div>
</div>
</nav>
</div>
</div>
</div>
</div>
</header>
CSS
I am using the default bootstrap 3.0 CSS and have a seperate CSS file overriding some default CSS and adding my own
I had to do this because the pills section has to be in its own div in the centre column in order to work (disappear one by one and 'stack' as width decreases) and fill all the width between the left and right cols in the navbar.
.navbar-collapse:after {
clear: none;
}
.sorting, .sorting_asc, .sorting_desc {
background : none;
}
.top-buffer {
margin-top: 20px !important;
}
.removeclass{
font-size: 1.5em;
vertical-align: middle !important;
}
.removeclass:hover{
text-decoration: none;
}
.vr-navigation {
float: left;
width: 100%;
}
.rightnav {
float: right;
width: 285px;
margin-left: -160px;
}
.leftnav {
margin-right: 160px;
padding:0 10px;
width:auto;
height: 40px;
}
.nav-pills {
height: 40px;
}
.hidden-xs {
display: inline-block !important;
}
#media (max-width: 767px) {
.hidden-xs {
display: none!important;
}
}
.current {
font-weight: bold;
}
.nav-pills li a {
color: white;
}
.vr-nav-container
{
display: table;
}
.vr-nav-container > div
{
display: table-row;
}
.vr-nav-container > div > div
{
display: table-cell;
}
.vr-nav-container > div > div
{
padding: 0em;
}
.vr-nav-container .nowrap
{
white-space: nowrap;
}
.vr-nav-container .fill
{
margin: 0 auto;
}
.vr-nav-container .center
{
text-align: center;
}
.vr-nav-col1
{
/*background: red;*/
width: 5%;
min-width: 50px;
white-space: nowrap;
}
.vr-nav-col2
{
width: 50%;
margin: 0 auto;
/*background: yellow;*/
}
.vr-nav-col3
{
/*background: green;*/
width: 40%;
/*min-width: 260px;*/
}
.no-padding
{
padding-left: 0px !important;
padding-right: 0px !important;
}
.main-nav-closed #main-nav .navigation > .nav > li:hover > a.toggler-flyout > span
{
display: none;
}
/*.main-nav-closed #main-nav .navigation > .nav > li:hover > a.toggler-flyout > i
{
content: "\f061";
}*/

Resources