Non-responsive country image in the navigation bar

After successfully implementing a responsive navigation bar using HTML and CSS, I noticed an issue with the flag images within my navigation bar. While the text is responsive, the flag images are not behaving as expected. Can anyone provide assistance with this? Thank you. My goal is to position the flag images before the navbar-toggler-icon rather than after it. Below is the code snippet for reference. Appreciate any help offered.

<!DOCTYPE html>
<html lang="en">

  <head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Logo Nav - Start Bootstrap Template</title>

    <!-- Bootstrap core CSS -->
    <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <script type='text/javascript' src='jquery.particleground.js'></script>
    <script type='text/javascript' src='demo.js'></script>

    <!-- Custom styles for this template -->

    <style type="text/css">

      .logo span {
        height: 50%;
        line-height: 50px;
        float: left;
        color: #fed136;
        font-size:30px;font-weight:700;letter-spacing:0.1em;
        font-family: 'Kaushan Script','Helvetica Neue',Helvetica,Arial,cursive;
      }
      .logo {
        line-height: 50px;
        float: left;
        color: #fff;
        font-size:20px;
        font-family: 'Kaushan Script','Helvetica Neue',Helvetica,Arial,cursive;
        font-weight:700;
        letter-spacing:0.1em;
      }
      body {
        padding-top: 54px;
      }
      @media (min-width: 992px) {
        body {
          padding-top: 56px;
        }
      }
      @media (max-width: 578px){
        .logo {
            font-size: 10px;
        }
      }

    </style>
  </head>

  <body>

    <!-- Navigation -->
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
      <div class="container">
        <a class="navbar-brand" href="#">
              <div class="logo"><span>FASHION</span><br>CELEBRATE OUR FASHION</div>
        </a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive"aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarResponsive">
          <ul class="navbar-nav ml-auto">
            <li class="nav-item active">
                      <a href="#" class="active nav-link">Home</a>
            </li>
            <li class="nav-item">
                      <a class="nav-link" href="#">INFO</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">STORE</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Contact</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Account</a>
            </li>
               <li class="nav-item">
                    <a class="nav-link" href="#">CART</a>
                 </li>

         </ul>
        </div>
        <div class="langswitch"><a href=""><img class="flag-australia"src="australia.svg" width="30px;"></a>
            <a href=""><img src="south-korea.svg" class="flag-korea"width="30px;"></a>
          </div>
      </div>
    </nav>

    <script src="vendor/jquery/jquery.min.js"></script>
    <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

  </body>

</html>

The result obtained so far can be viewed https://i.sstatic.net/59o5O.png.

Answer №1

Relocate the menu toggle button to a position after the langswitch division.

<button class="navbar-toggler"> 

....
<div class="langswitch">

Answer №2

Duplicate the flags section and insert it above the menu (remember to assign a different class). Next, set one of them to be hidden (based on the screen width defined in media queries)

Alternatively, you may also position the button after the flags section.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Having trouble making ngMouseEnter (and other similar commands) function correctly

I'm currently working with Bootstrap 4 on Angular 6, and I have a delete button that I want to change its icon when the cursor hovers over it. I've tried using various ng functions like ngMouseOver and ngMouseUp, but none seem to be effective in ...

Issue with stretched links in Bootstrap 5 specifically affecting certain recurring elements on mobile devices

I am facing an issue with a table that has a few hundred rows generated by a recurring PHP script. Utilizing Bootstrap 5, I am using a stretched link to enable the entire row of the table to be clickable. The functionality works perfectly on desktop and ev ...

Creating custom themes in React Native using dynamically loaded JSON data

Is it possible in React Native to override custom styles with dynamically fetched font-size and background color values from a server's JSON data? I am looking to incorporate this JSON data theme into my style themes. Can you provide the syntax for cr ...

Photo Label fails to adjust size correctly when loading two sources (png and webp)

Currently, I have been working on a website that showcases a 3D book: https://i.sstatic.net/oC1nL.png The challenge I am facing is to ensure support for both png and webp images across all browsers. Initially, when I load just one image, everything works ...

Is there a way to display images in Vuetify similar to the linked image below?

I am looking to measure my v-img like the one shown in the image below. https://i.stack.imgur.com/edMKr.jpg Does anyone know how I can achieve something similar to the image shown using vuetify's v-img. <div class="row"> <v ...

Retrieve Object Key in Angular 7

I have a specific item: this.item = { name:"Michael", age:18 }; I am looking to display it in an HTML format. name: Michael age: 18 <div >{{ item (name) }}</div> --??? should put name <div>{{ item.name }}</div> < ...

Is it possible for me to interact with different elements upon hovering?

html, <div id="first"> <a>Click here</a> </div> <div id=second"> second div content </div> css, #first a:hover{ color:blue; /*change color on hover */ #second{ background:blue; } } In ...

Exploring the world of video playback with Angular

I'm currently developing an Angular application and incorporating the HTML 5 video tag in my code to enable video playback. The relevant code snippet is as shown below: <video autoplay> <source src="videos/video.mp4" type="video/m ...

Responsive photo gallery that fully covers your entire screen with stunning images, designed in HTML

Is there a way to adjust the div containing photos to take up all available space without large margins within the row, while also maintaining a consistent height for all photos in both horizontal and vertical orientations and ensuring responsiveness? The ...

Using ExpressJS to pass a variable from a .js file to index.html

I need assistance with integrating [email protected] I am trying to access a variable from main.js in index.html Here is the code in main.js: const express = require('express') const app = express() var router = express.Router() app.use(& ...

Node containing clickable buttons

TL;DR - Can we implement functional links within a jsTree node without resorting to JavaScript redirection? I am interested in incorporating buttons inside a jsTree node, like so: This was my initial attempt: $('#tree').jstree({ &apos ...

Connecting Filters Vue.js

I am in need of chaining filters. My goal is to implement the following filters: - A search filter - A checkbox styled price filter with pre-defined values such as <$10, $20-$50, $50+ - A checkbox styled filter for selecting 'topics' ...

A straightforward jQuery conditional statement for dynamically generated content

If the div '#ajax' contains content, I want to make the div '.container' clickable. Here is the basic jQuery script I have implemented: if ('#ajax:empty') { $('.container').css('pointer-events', ' ...

Tips for updating button dimensions and colors on the fly in React

Currently, I have developed a custom Button component in my React application. At the moment, I am able to dynamically modify the color by specifying it within the color attribute. However, I now aim to provide an option to change the size of the button as ...

Altering HTML code using jQuery within an Angular app for a WYSIWYG editor

I am working with a wysiwyg editor that utilizes a $scope variable to generate HTML content. Currently, I am trying to dynamically add div elements at specific locations within the HTML string. This will allow me to programmatically modify different parts ...

PHP loaded HTML does not allow JavaScript to execute

My system includes an announcements feature where all announcements are retrieved from a database and displayed on the screen using Ajax and PHP. Below is the code snippet used to load each announcement onto the page: echo '<div id="announcements ...

Exploring the world of XML parsing with iText

I am curious to learn whether it is feasible to modify the font, color, and size while converting HTML to PDF using xmlWorker.parser. Thus far, I have successfully parsed the input as is, but now I am seeking ways to customize the font, size, color, and ...

There is no element available to input text using send_keys in Selenium

Currently learning about selenium, please pardon any errors. Thank you :) I am trying to scrape a website that allows users to create blogs on 'tistory' using selenium. In order to publish an article, I need to choose between default mode, mark ...

Is there a way to make the table header stretch across the entire table when using display properties to simulate a <table>?

I made a switch from an old table to a new one constructed using Divs, and everything seems to be working fine except for one issue. I am trying to create a header that spans the entire width of the table without having multiple cells in the heading like i ...

hierarchical browsing system

Take a look at the image provided below. Currently, I am using multiple unordered lists - specifically 5. However, I would prefer to consolidate them all into a single nested ul. I am encountering two issues: How can I add a border-bottom to the hori ...