I've been delving into Bootstrap and trying to create a theme from scratch. However, I've hit a roadblock right at the beginning with an unexpected issue - the icons are stuck next to the logo on the right side of the page despite using float:left
along with !important
. This should align them to the left but it's not working as expected!
What could be causing this problem? How can I correctly position the icons to the left side and the logo to the right side?
* {
font-family: aviny;
font-size: 22px;
text-align: right;
direction: rtl;
}
.top-header {
margin-top: 20px;
}
.instagram-icon img {
float: left !important;
/* Issue: Icons are not moving to the left side as intended */
}
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="91f3fefee5e2e5e3f0e1d1a5bfa7bfa3">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
</head>
<body>
<div class="container top-header">
<div class="row">
<img src="https://via.placeholder.com/80" alt="logo header" width="80">
<div class="instagram-icon">
<img src="https://via.placeholder.com/50" alt="instagram">
<img src="https://via.placeholder.com/50" alt="telegram">
<img src="https://via.placeholder.com/50" alt="youtube">
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f4969b9b808780869584b4c0dac2dac6">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
</body>