Bootstrap Nav Bar - Text Layout
I'm trying to set-up a navbar on a site I'm working on and I'm having a bit of an issue.
In the code below my navbar text is display on separate lines, which I only want it to do that when it's in the collapsed view and not normal view. Any ideas? I'm probably just being stupid here but any help is appreciated. (Also, any tips or anything about good practices or something I'm doing wrong, please say so I can fix it for the future.)
*
padding: 0;
margin: 0;
html, body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
<a href="#" class="nav-link">Graphics/Design</a>
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
bootstrap-4 nav
add a comment |
I'm trying to set-up a navbar on a site I'm working on and I'm having a bit of an issue.
In the code below my navbar text is display on separate lines, which I only want it to do that when it's in the collapsed view and not normal view. Any ideas? I'm probably just being stupid here but any help is appreciated. (Also, any tips or anything about good practices or something I'm doing wrong, please say so I can fix it for the future.)
*
padding: 0;
margin: 0;
html, body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
<a href="#" class="nav-link">Graphics/Design</a>
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
bootstrap-4 nav
Solved. Never mind, I realised my own stupidity. Put all 3 links inside on list item.
– Conner Murphy
Nov 14 '18 at 13:23
add a comment |
I'm trying to set-up a navbar on a site I'm working on and I'm having a bit of an issue.
In the code below my navbar text is display on separate lines, which I only want it to do that when it's in the collapsed view and not normal view. Any ideas? I'm probably just being stupid here but any help is appreciated. (Also, any tips or anything about good practices or something I'm doing wrong, please say so I can fix it for the future.)
*
padding: 0;
margin: 0;
html, body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
<a href="#" class="nav-link">Graphics/Design</a>
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
bootstrap-4 nav
I'm trying to set-up a navbar on a site I'm working on and I'm having a bit of an issue.
In the code below my navbar text is display on separate lines, which I only want it to do that when it's in the collapsed view and not normal view. Any ideas? I'm probably just being stupid here but any help is appreciated. (Also, any tips or anything about good practices or something I'm doing wrong, please say so I can fix it for the future.)
*
padding: 0;
margin: 0;
html, body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
<a href="#" class="nav-link">Graphics/Design</a>
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
*
padding: 0;
margin: 0;
html, body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
<a href="#" class="nav-link">Graphics/Design</a>
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
*
padding: 0;
margin: 0;
html, body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
<a href="#" class="nav-link">Graphics/Design</a>
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
bootstrap-4 nav
bootstrap-4 nav
asked Nov 14 '18 at 13:18
Conner MurphyConner Murphy
94
94
Solved. Never mind, I realised my own stupidity. Put all 3 links inside on list item.
– Conner Murphy
Nov 14 '18 at 13:23
add a comment |
Solved. Never mind, I realised my own stupidity. Put all 3 links inside on list item.
– Conner Murphy
Nov 14 '18 at 13:23
Solved. Never mind, I realised my own stupidity. Put all 3 links inside on list item.
– Conner Murphy
Nov 14 '18 at 13:23
Solved. Never mind, I realised my own stupidity. Put all 3 links inside on list item.
– Conner Murphy
Nov 14 '18 at 13:23
add a comment |
1 Answer
1
active
oldest
votes
Instead of wrapping nav-link
in nave-item
wrap nav-item in navbar-nav
See the documentation
*
padding: 0;
margin: 0;
html,
body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Graphics/Design</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53301170%2fbootstrap-nav-bar-text-layout%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Instead of wrapping nav-link
in nave-item
wrap nav-item in navbar-nav
See the documentation
*
padding: 0;
margin: 0;
html,
body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Graphics/Design</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
add a comment |
Instead of wrapping nav-link
in nave-item
wrap nav-item in navbar-nav
See the documentation
*
padding: 0;
margin: 0;
html,
body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Graphics/Design</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
add a comment |
Instead of wrapping nav-link
in nave-item
wrap nav-item in navbar-nav
See the documentation
*
padding: 0;
margin: 0;
html,
body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Graphics/Design</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
Instead of wrapping nav-link
in nave-item
wrap nav-item in navbar-nav
See the documentation
*
padding: 0;
margin: 0;
html,
body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Graphics/Design</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
*
padding: 0;
margin: 0;
html,
body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Graphics/Design</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
*
padding: 0;
margin: 0;
html,
body
height: 100%;
width: 100%;
.container-fluid
padding: 0px !important;
#collapsedNavbar
text-align: center;
#header
height: 100px;
margin-top: 75px;
text-align: center;
#content-container
#content
#art-work
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="author" content="Conner Murphy">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0 viewport-fit=cover">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./css/index-style.css">
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<title> </title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light justify-content-end">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsedNavbar" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsedNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link">Art Work</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Graphics/Design</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Other</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid" id="content-container">
<div class="container" id="header">
<div class="row">
<div class="col-sm-12">
<h1>Test Title</h1>
</div>
</div>
</div>
<div class="container-fluid" id="content">
<div class="container" id="art-work">
</div>
</div>
</div>
<footer class="footer">
<div class="container">
</div>
</footer>
</body>
</html>
answered Nov 14 '18 at 13:23
Ismail FarooqIsmail Farooq
4,01711535
4,01711535
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53301170%2fbootstrap-nav-bar-text-layout%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Solved. Never mind, I realised my own stupidity. Put all 3 links inside on list item.
– Conner Murphy
Nov 14 '18 at 13:23