I have the code below:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<body>
<div class="container">
<header class="navbar navbar-expand navbar-light flex-column flex-md-row bg-faded rounded">
<a class="navbar-brand mr-0 mr-md-2" href="/"><i class="fa fa-btc fa-2x" aria-hidden="true"></i></a>
<div class="navbar-nav-scroll">
<ul class="navbar-nav bd-navbar-nav flex-row mt-1">
<li class="nav-item active">
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/profile">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/conditions">Conditions</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/feedback">Feedback</a>
</li>
</ul>
</div>
<a class="btn btn-default mb-3 mb-md-0 ml-md-3" href="http://twitter.com/btclottery2018" aria-label="Twitter">
<i class="fa fa-twitter-square fa-2x" aria-hidden="true"></i>
</a>
</header>
</div>
</body>
My links are stuck together, but they must be the distance and the Twitter icon should be in the right corner. What is my mistake? What did I do wrong?
4
Answers
You can try this in your custom css
Add this style in your style sheet.
As per your code, you have included the bootstrap css, but the design need some more css for width, positioning and spacing of the elements.
Try to do it this way. Add the extra CSS.
Extra CSS Part :-
You need to do three things here:
You need to give a padding to the class “nav-items”, something like this:
.nav-items{
padding:10px
}
I’m attaching a JSFiddle for your reference. I hope this solves your problem.
https://jsfiddle.net/dk4v76rw/