Responsive navigation links being pushed under navigation bar when browser is made smaller

Keywords: html css

Question: 

I am trying to create a responsive website. I had a navigation bar on top of the page with links on the right and social media icons on the left. When I make the browser smaller it pushes the links under the navigation bar as if it was being pushed into another div.

I believe the social icons are causing the problem. They are two different div's inside multiple div's. If I remove the social icons it works but I would like to keep the social icons top left.

<body>
<div id="outerWrapper"> </div>
<div id="navWrapper">
<div id="navInnerWrapper">
    <div id="topSocials">
        <a href="URL"><img alt="facebook icon" src="images/fb_social.png"></a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="URL"><img  alt="linkedin icon" src="images/linkedin_social.png"></a>
        </div>
    <div id="navBar">
    <ul>
        <li><a href="#">About</a></li>
        <li><a href="#">Our Work</a></li>
        <li><a href="#">Contact Us</a></li>
        </ul>
  </div>
</div>

#outerWrapper {
width: 100%;
height: auto;
display: block;
position: relative;
color: #333333;
font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu 
Sans Condensed", Helvetica, Arial, sans-serif;
font-size: 14px;
text-align: left;
line-height: 20px;
}
#navWrapper {
width: 100%;
height: 45px;
display: block;
padding-top: 10px;
padding-bottom: 10px;
position: relative;
clear: both;
border-bottom: 3px solid #000000;
background-color: #9FA2B2;
}
#navInnerWrapper {
width: auto;
height: auto;
display: block;
margin-left: auto;
margin-right: auto;
position: relative;
clear: both;
padding-right: 200px;
}
#topSocials {
width: 231px;
display: block;
position: relative;
float: left;
height: auto;
padding-top: 5px;
padding-left: 50px;
}
#navBar {
width: 600px;
display: block;
position: relative;
float: right;
height: auto;
color: #FFFFFF;
text-align: right;
text-transform: uppercase;
}

ul {
list-style-type: none;
}
ul li {
display: inline;
padding-left: 40px;
}

#navBar a:link {color: #16262E; text-decoration: none; }
#navBar a:visited {color: #16262E; text-decoration: none; }
#navBar a:hover {color: #FFFFFF; text-decoration: none; }
#navBar a:active {color: #16262E; text-decoration: none; }

This is what it looks like when I make the browser smaller. https://imgur.com/a/BLSilIp

Want the navigation to be responsive with links on the right and social icons on the left.

Answers: