Font Awesome Icon fails to appear in the static bottom section on a 320px width mobile device screen

On my mobile device with a screen width of 320px, I'm having trouble with the Account icon not displaying correctly. The issue seems to be specific to this icon within my fixed bottom navigation bar. My layout is built using Bootstrap and I'm using Font Awesome for the icons.

When I view the website on a 320px screen width device, only half of the Account icon appears. It's strange because the other icons are showing up fine without any issues. I've tried switching to different Font Awesome icon classes for the Account icon, but the problem persists.

Can anyone suggest a solution to fix this problem?

.fixed-bottom-section {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: white;
    z-index: 1000;
    box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); 
}
.fixed-bottom-section .my_icons {
    margin-left: -35px;
}
.fixed-bottom-section .my_icons a:hover {
    color: #007bff;
}
.my_icons a {
    color: black;
    font-size: 14px;
    text-decoration: none;
}
.my_icons a:hover {
    color: #007bff;
    text-decoration: none;
}
.my_icons i {
    font-size: 20px; 
    display: block;
    margin-bottom: 5px; 
}
.my_icons p {
    margin: 0;
    font-size: 12px;
}
        <link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f4969b9b808780869584b4c1dac4dac6">[email protected]</a>/dist/css/bootstrap.min.css" 
    rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" 
    crossorigin="anonymous">
    <link rel="stylesheet" 
    href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.1/css/all.min.css">
        <section class="fixed-bottom-section">
            <div class="card">
                <div class="card-body">
                    <div class="container">
                        <div class="row justify-content-center">
                            <div class="col text-center">
                                <div class="my_icons d-flex justify-content-between">
                                    <a href="#" class="nav-link text-center">
                                        <i class="fa-solid fa-house-chimney"></i>
                                        <p>Home</p>
                                    </a>
                                    <a href="{% url 'Transaction' %}" class="nav-link text-center">
                                        <i class="fa-solid fa-rotate-right"></i>
                                        <p>Transaction</p>
                                    </a>
                                    <a href="{% url 'Wallet_Summary' %}" class="nav-link text-center">
                                        <i class="fa-solid fa-money-bill"></i>
                                        <p>History</p>
                                    </a>
                                    <a href="#" class="nav-link text-center">
                                        <i class="fa-solid fa-plus"></i>
                                        <p>Fund</p>
                                    </a>
                                    <a href="{% url 'Account' %}" class="nav-link text-center">
                                        <i class="fa-solid fa-user"></i>
                                        <p>Account</p>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

Answer №1

Suggestions for resolving the issue:

1- Implement flex-wrap to prevent cutting off content Ensure that icons in the .my_icons container wrap to the next line when the screen size is too small:

.fixed-bottom-section .my_icons {
    margin-left: 0;
    flex-wrap: wrap; 
}

2- Modify justify-content for center alignment

.fixed-bottom-section .my_icons {
    display: flex;
    justify-content: space-around; 
    margin-left: 0; 
}

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

Transform shorthand CSS font properties into their longhand equivalents

When dealing with a font CSS string like the examples below: font:italic bold 12px/30px Georgia, serif; or font:12px verdana; I aim to convert it into its longhand format which would be: font-style: italic; font-weight: bold; My initial attempt can b ...

The marriage of a sticky and floating navigation bar using the power of Bootstrap 4

I am currently designing a navigation bar inspired by the layout on the EA GAMES website. While it functions perfectly in Chrome, I am encountering significant display issues in Internet Explorer. Any suggestions on how to troubleshoot and resolve this pro ...

The rendering of the font appears distinct when viewed on an iPad compared to when displayed

Visit this website. The menu displays correctly on desktop, but on iPads, the font appears larger leading to a line break. Is it because the selected font isn't loading and defaulting to Times New Roman instead? It seems likely since I experience the ...

Ensure that the width of the sibling div matches the width of its sibling image

I need help displaying an image with two buttons positioned below it. The dimensions of the image can vary, so I've set a max-width of 60% and max-height of 80%. However, I'm struggling to align the buttons correctly under the image - with the le ...

What sets minifying CSS apart from compressing CSS?

Recently, I was focused on enhancing my website's performance and decided to run a google developer performance test. The results were positive overall, but the google analyzer recommended compressing the CSS files for even better performance. Up unt ...

What is the best way to dynamically update styleUrls or style properties in Angular?

One of my goals is to give users the ability to customize colors and certain styles within my Angular application. I am thinking about creating a structure like this: Structure: component-one   folder-with-css-files     style-for-component-1-fo ...

Two conditional statements. Both are functional, but only one displays an output

I am currently attempting to rotate a fixed image in synchronization with fullpage.js, and for the most part, it is functioning correctly. To avoid undesired rotation, I need to stack CSS rotate() values. The stacking works as intended when scrolling dow ...

Dropbox menu within an extended webpage

I am looking to create a dropdown menu that behaves like the one on this website. The goal is for the dropdown to cover the entire webpage, hide the scroll bar, and "unmount" the other elements of the page, while still displaying them during the transition ...

The sequence of HTML attributes

Could there be a subjective angle to this question (or maybe not)... I work on crafting web designs and applications using Visual Studio and typically Bootstrap. When I drag and drop a CSS file into an HTML document, the code generated by Visual Studio loo ...

I want to create CSS columns that stretch to the full height of the window, positioned between a header and a footer, while also

I am looking to create a basic HTML layout with CSS that includes a header and two columns. The right column should have a fixed width of 100px, while the left column may have varying content lengths. I want both columns to stretch to the footer. Below is ...

Confused by navigating with php

I've been attempting to convert this link into a PHP foreach loop without any success, and I'm new to Stack Overflow. I've used an array to generate the code, but I am uncertain of how to transform this code into a foreach loop. <ul class ...

The table border is not being displayed when using the display:table CSS property

<html> <style type="text/css"> .table { display: table;} .tablerow { display: table-row; border:1px solid black;} .tablecell { display: table-cell; } </style> <div class="table" ...

Altering an element's visibility from 'none' will trigger its animation to play once again

Take a look at the snippet below and you'll see that the sliding animation plays twice - once when the .addClass statement runs, and again when #test's display is switched to 'initial' (timeouts are in place to help visualize the issue) ...

Issue: Stylesheet not being loaded on Index.html through Gulp

Issue The .css file is not being loaded by the index.html despite setting up a gulp.js file. It seems like the folder directory might be causing the problem. However, the .scss files in the /src/scss folder are compiling correctly into CSS within the /bui ...

Is there a way to generate a unique color using only green, blue, orange, and gold values?

If someone knows the "weights" of red, green, and blue, they can create a color using a class like .customRGB { color: rgb(128, 128, 128) } .customHSL { color: hsl(33%, 34%, 33%) and use it in HTML like this: <p class="customRGB">CUSTOM RG ...

Leveraging Font Awesome and Material Icons within ngFor in Angular 2

I have a unique situation where I need to display a dynamic list of icons in a right side bar. These icons are added to the sidebar based on user actions and are displayed using the ngFor directive. The challenge here is that some icons come from Font Awe ...

Javascript failing to choose background color from an array

I am attempting to create a subheader with varying colors, similar to the one found on the Ask Different page. However, instead of manually assigning colors, I am looking to have it randomly select a color from a Javascript array. I have already outlined ...

The incorporation of SVG within a span disrupts the conventional left-to-right arrangement of its child elements

As I was working with some basic HTML, I encountered an issue. <span> <span>Hello</span> <span>World</span> </span> The above code displays: Hello World However, when I tried adding an SVG element like this: <s ...

Ways to implement material-ui button design on an HTML-native button

I am using pure-react-carousel which provides me an unstyled HTML button (ButtonBack). I would like to customize its style using material-ui. Trying to nest buttons within buttons is considered not allowed. An approach that works is manually assigning th ...

Modifying Table Cell Background Color in ReactJS: A Guide to Conditionally Updating Cell Color Without Affecting the Entire Row

I am working on changing the background color of a cell based on its value. Currently, I am utilizing the following library: react-data-table-component Procedure: If the value is above 0, then the cell's background color will be red. Otherwise, th ...