1
I managed to leave the blue bar but the button always turns green regardless of color
I’m using this code:
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>Site-base</title>
<link rel="stylesheet"href="css/estilo.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<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://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</head>
<body>
<div class="principal" >
<header><img src="IMG/intelcore.jpg" alt="some text" width=310 height=200></header>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo01">
<a class="navbar-brand" href="#">Home</a>
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active">
<a class="nav-link" href="#">Computadores <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="#">Celulares <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="#">Tablets <span class="sr-only">(current)</span></a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="Buscar" aria-label="Buscar" style="background-color:white;">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Buscar</button>
</form>
</div>
</nav>
<aside>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action active" style="height: 67px">
Equipamentos:
</a>
<a href="file:///C:/Users/Cleit/OneDrive/%C3%81rea%20de%20Trabalho/Site/monitores.html" class="list-group-item list-group-item-action" style="height: 63px">Placa de vídeo</a>
<a href="#" class="list-group-item list-group-item-action" style="height: 63px">Processadores</a>
<a href="#" class="list-group-item list-group-item-action" style="height: 63px">Monitores</a>
<a href="#" class="list-group-item list-group-item-action" style="height: 63px">Fonte</a>
<a href="#" class="list-group-item list-group-item-action" style="height: 63px">Gabinete</a>
<a href="#" class="list-group-item list-group-item-action" style="height: 63px">Mouses</a>
<a href="#" class="list-group-item list-group-item-action" style="height: 63px">Teclados</a>
</div>
</aside>
<section>
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2" class="active"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="IMG/rtx.jpg" class="d-block w-100" alt="RTX" height=500px>
</div>
<div class="carousel-item">
<img src="IMG/gtx300.jpg" class="d-block w-100" alt="GTX300" height=500px>
</div>
<div class="carousel-item">
<img src="IMG/intelcore.jpg" class="d-block w-100" alt="..." height=500px>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</section>
<main>
<div class="container" style="min-width: 100%; margin: 0 auto;">
<div class="item item1">
<div class="card" style="width: 19rem;">
<img src="IMG/rtxazul.jpg" class="card-img-top" style="hidth=10px;">
<div class="card-body">
<h5 class="card-title"></h5>
<p class="card-text"></p>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item"></li>
<li class="list-group-item"></li>
<li class="list-group-item"></li>
</ul>
<div class="card-body">
<a href="#" class="card-link">COMPRAR</a>
<a href="#" class="card-link">DETALHES</a>
</div>
</div>
</div>
<div class="item item2">
<div class="card" style="width: 19rem;">
<img src="IMG/teclado.jif" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title"></h5>
<p class="card-text"></p>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item"></li>
<li class="list-group-item"></li>
<li class="list-group-item"></li>
</ul>
<div class="card-body">
<a href="#" class="card-link"></a>
<a href="#" class="card-link"></a>
</div>
</div>
</div>
<div class="item item3">
<div class="card" style="width: 19rem;">
<img src="IMG/rtx.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title"></h5>
<p class="card-text"></p>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item"></li>
<li class="list-group-item"></li>
<li class="list-group-item"></li>
</ul>
<div class="card-body">
<a href="#" class="card-link">COMPRAR</a>
<a href="#" class="card-link">DETALHES</a>
</div>
</div>
</div>
<div class="item item4">
<div class="card" style="width: 19rem;">
<img src="IMG/rtx.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title"></h5>
<p class="card-text"></p>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item"></li>
<li class="list-group-item"></li>
<li class="list-group-item"></li>
</ul>
<div class="card-body">
<a href="#" class="card-link"></a>
<a href="#" class="card-link"></a>
</div>
</div>
</div>
</div>
</main>
<footer>
</footer>
</div>
</body>
</html>
I saw on some sites that using the following code would change the color, but changes the style of the bar also and the button disappears:
<nav class="navbar navbar-dark bg-primary">
I put all the code, you’re a bit buggy but I think you can understand
– Cleiton Do Carmo
I made the change in your code. See if you will answer.
– Lucas Ayrosa
Got it, thank you very much helped me a lot.
– Cleiton Do Carmo