Kindly take a look at the following link:
http://83.212.101.132/betdk/home/two
As the user scrolls, the navbar moves to the top thanks to the
affix
plugin.However, it occupies the entire row with "Home" aligned to the left.
What steps should I take to:
- Maintain the full-width blue background
- Keep the contents centered
Here is the CSS related to affix:
.affix {
position: fixed;
top: 0;
width: 100%;
left: 0;
z-index: 10;
box-shadow: 0 0 30px black;
-webkit-border-radius: 0 !important;
-moz-border-radius: 0 !important;
border-radius: 0 !important;
}
.affix .subcon {
/* The wrapper around the navbar contents */
}
Any suggestions?
UPDATE
Unykvis' solution does indeed work.
Just add the following (to prevent any issues with the original navbar contents)
.navbar .container {
padding-left: 0px;
padding-right: 47px;
}
.navbar.affix .container {
padding-left:15px;
padding-right:15px;
}