Why don't the pills in Bootstrap 4 have any style?
up vote
0
down vote
favorite
I was trying to make a vertical navbar with Bootstrap 4 pills, but when I tried to use them, I couldn't get the style to show. They all look like regular links.
Pills without styles:
<ul class="nav nav-pills flex-column">
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>home" class="nav-link">Admin Dashboard</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>user-list/1" class="nav-link">Users</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>category-list/1" class="nav-link">Categories</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>car-list/1" class="nav-link">Cars</a>
</li>
<li class="nav-item">
<a href="<?php echo MAIN_URL;?>" class="nav-link">Main Page</a>
</li>
css menu bootstrap-4
New contributor
Adven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
0
down vote
favorite
I was trying to make a vertical navbar with Bootstrap 4 pills, but when I tried to use them, I couldn't get the style to show. They all look like regular links.
Pills without styles:
<ul class="nav nav-pills flex-column">
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>home" class="nav-link">Admin Dashboard</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>user-list/1" class="nav-link">Users</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>category-list/1" class="nav-link">Categories</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>car-list/1" class="nav-link">Cars</a>
</li>
<li class="nav-item">
<a href="<?php echo MAIN_URL;?>" class="nav-link">Main Page</a>
</li>
css menu bootstrap-4
New contributor
Adven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I was trying to make a vertical navbar with Bootstrap 4 pills, but when I tried to use them, I couldn't get the style to show. They all look like regular links.
Pills without styles:
<ul class="nav nav-pills flex-column">
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>home" class="nav-link">Admin Dashboard</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>user-list/1" class="nav-link">Users</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>category-list/1" class="nav-link">Categories</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>car-list/1" class="nav-link">Cars</a>
</li>
<li class="nav-item">
<a href="<?php echo MAIN_URL;?>" class="nav-link">Main Page</a>
</li>
css menu bootstrap-4
New contributor
Adven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I was trying to make a vertical navbar with Bootstrap 4 pills, but when I tried to use them, I couldn't get the style to show. They all look like regular links.
Pills without styles:
<ul class="nav nav-pills flex-column">
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>home" class="nav-link">Admin Dashboard</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>user-list/1" class="nav-link">Users</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>category-list/1" class="nav-link">Categories</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>car-list/1" class="nav-link">Cars</a>
</li>
<li class="nav-item">
<a href="<?php echo MAIN_URL;?>" class="nav-link">Main Page</a>
</li>
css menu bootstrap-4
css menu bootstrap-4
New contributor
Adven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Adven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 2 hours ago
Nick Parsons
2,0332418
2,0332418
New contributor
Adven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 hours ago
Adven
64
64
New contributor
Adven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Adven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Adven is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Only the active Link gets the styling
<ul class="nav nav-pills flex-column">
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>home" class="nav-link active">Admin Dashboard</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>user-list/1" class="nav-link">Users</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>category-list/1" class="nav-link">Categories</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>car-list/1" class="nav-link">Cars</a>
</li>
<li class="nav-item">
<a href="<?php echo MAIN_URL;?>" class="nav-link">Main Page</a>
</li>
</ul>
That means only the element that contains the active class has the styling (for example the first entry in my answer code)
More Info
Thank you, I was sure I'd made a rookie mistake somewhere. Glad to know where
– Adven
2 hours ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Only the active Link gets the styling
<ul class="nav nav-pills flex-column">
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>home" class="nav-link active">Admin Dashboard</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>user-list/1" class="nav-link">Users</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>category-list/1" class="nav-link">Categories</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>car-list/1" class="nav-link">Cars</a>
</li>
<li class="nav-item">
<a href="<?php echo MAIN_URL;?>" class="nav-link">Main Page</a>
</li>
</ul>
That means only the element that contains the active class has the styling (for example the first entry in my answer code)
More Info
Thank you, I was sure I'd made a rookie mistake somewhere. Glad to know where
– Adven
2 hours ago
add a comment |
up vote
0
down vote
accepted
Only the active Link gets the styling
<ul class="nav nav-pills flex-column">
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>home" class="nav-link active">Admin Dashboard</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>user-list/1" class="nav-link">Users</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>category-list/1" class="nav-link">Categories</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>car-list/1" class="nav-link">Cars</a>
</li>
<li class="nav-item">
<a href="<?php echo MAIN_URL;?>" class="nav-link">Main Page</a>
</li>
</ul>
That means only the element that contains the active class has the styling (for example the first entry in my answer code)
More Info
Thank you, I was sure I'd made a rookie mistake somewhere. Glad to know where
– Adven
2 hours ago
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Only the active Link gets the styling
<ul class="nav nav-pills flex-column">
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>home" class="nav-link active">Admin Dashboard</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>user-list/1" class="nav-link">Users</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>category-list/1" class="nav-link">Categories</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>car-list/1" class="nav-link">Cars</a>
</li>
<li class="nav-item">
<a href="<?php echo MAIN_URL;?>" class="nav-link">Main Page</a>
</li>
</ul>
That means only the element that contains the active class has the styling (for example the first entry in my answer code)
More Info
Only the active Link gets the styling
<ul class="nav nav-pills flex-column">
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>home" class="nav-link active">Admin Dashboard</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>user-list/1" class="nav-link">Users</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>category-list/1" class="nav-link">Categories</a>
</li>
<li class="nav-item">
<a href="<?php echo ADMIN_URL;?>car-list/1" class="nav-link">Cars</a>
</li>
<li class="nav-item">
<a href="<?php echo MAIN_URL;?>" class="nav-link">Main Page</a>
</li>
</ul>
That means only the element that contains the active class has the styling (for example the first entry in my answer code)
More Info
answered 2 hours ago
Badgy
838320
838320
Thank you, I was sure I'd made a rookie mistake somewhere. Glad to know where
– Adven
2 hours ago
add a comment |
Thank you, I was sure I'd made a rookie mistake somewhere. Glad to know where
– Adven
2 hours ago
Thank you, I was sure I'd made a rookie mistake somewhere. Glad to know where
– Adven
2 hours ago
Thank you, I was sure I'd made a rookie mistake somewhere. Glad to know where
– Adven
2 hours ago
add a comment |
Adven is a new contributor. Be nice, and check out our Code of Conduct.
Adven is a new contributor. Be nice, and check out our Code of Conduct.
Adven is a new contributor. Be nice, and check out our Code of Conduct.
Adven is a new contributor. Be nice, and check out our Code of Conduct.
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
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53203297%2fwhy-dont-the-pills-in-bootstrap-4-have-any-style%23new-answer', 'question_page');
}
);
Post as a guest
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
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
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