- Joined
- Aug 21, 2023
- Messages
- 40
- Reaction score
- 0
Hello everyone. I have nav-tabs aligned to. the left, but I want she search bar and the logo (svg) align to the right side of the nav-tabs. I tried with text-align:right and float:right but that didn't work. Is this maybe because of I use bootstrap, and how can I do this?
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sloppy music</title>
<!-- Bootstrap -->
<link href="css/bootstrap-4.4.1.css" rel="stylesheet">
<link href="styles.css" type="text/css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xl-12">
<ul class="nav nav-tabs">
<li class="nav-item"> <a class="nav-link active" href="#">Artists</a> </li>
<li class="nav-item"> <a class="nav-link" href="#">Playlists</a> </li>
<li class="nav-item"> <a class="nav-link" href="#">About</a> </li>
<li class="nav-item"> <a class="nav-link " href="#">Contact</a> </li>
<li><input type="text" placeholder="Type text">
<button type="button" class="btn btn-primary">Search</button>
</li>
<li><img src="images/sloppy.svg" class="img-fluid" width="50" id="logo"></li>
</ul>
</div></div>
</div>
</body>
</html>