Cody Cody - 1 month ago 17
CSS Question

Collapse menu, have all social media icons on one line

I'm a bootstrap n00b. So on my personal website, I have a nav bar that collapses when the screen width changes. Everything is working fine, as shown here:

enter image description here

However, I'd like if all of my social media icons were on one line. I have tried several things already, but I've had no luck.

Here is my html:

<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data- toggle="collapse" data-target="#navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav navbar-left">
<li><a href="./index" title="Bio">Bio</a></li>
<li><a href="./Resume" title="My Resume">Resume</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://www.linkedin.com/in/cody-reandeau-831038115" class="entypo-linkedin" target="_blank" title="Linkedin"></a></li>
<li><a href="https://github.com/codyreandeau" class="entypo-github" target="_blank" title="Github"></a></li>
<li><a href="https://www.freecodecamp.com/codyreandeau" class="fontawesome-fire" target="_blank" title="Free Code Camp"></a></li>
<li><a href="https://www.hackerrank.com/codyareandeau" class="fontawesome-sitemap" target="_blank" title="Hacker Rank"></a></li>
<li><a href="https://www.codecademy.com/scriptSurfer86103" class="zocial-html5" target="_blank" title="Codecademy"></a></li>
</ul>
</div>
</div>
</nav>


I'm thinking it is something I need to do in css?

.navbar-collapse {
display:inline;
}


^I've tried this, however it doesn't work; I imagine it is a little more complicated than just that. Any help at all would be great!

Answer

Try using inline-block instead of inline.

.navbar-right li {
    display: inline-block;
}