The footer information disappears when the page size is reduced

On the React-Bootstrap page, I've incorporated a footer container with 3 containers to store information. However, when reducing the size of the page, the data becomes invisible due to a length issue with the div.

What I aim for is to make sure that as the page size decreases, the footer data doesn't just vanish abruptly but adjusts based on the div size. Similar to how Google Earth's footer data works.

For example: If my footer data is "Welcome to the React-Bootstrap world" When the page size shrinks, it should appear as "Welcome to the..."

Below is the code:

<Container fluid className='container-footer'>
    <Row>
        <Col md={6}>Loading</Col>
        <Col md={6>
            <div className="footer-controller">
                <a href="https://leafletjs.com" title="A JavaScript library for interactive maps" style={{color:'#fff'}}>
                    <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8">
                        <path fill="#4C7BE1" d="M0 0h12v4H0z"></path>
                        <path fill="#FFD500" d="M0 4h12v3H0z"></path>
                        <path fill="#E0BC00" d="M0 7h12v1H0z"></path>
                    </svg> Leaflet</a>
                <span aria-hidden="true"gt;|</span> Welcome to the React-Bootstrap world
            </div>
        </Col>
    </Row>
</Container>

CSS:

.container-footer {
  position: absolute;
  height: 19px;
  font-size: 13px;
  font-weight: 100;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  bottom: 0;
  color: #fff !important;
}

.footer-controller {
  float: right;
}

Answer №1

Consider trying something similar to the following code snippet

.container-footer {
  position: absolute;
  height: 59px;
  font-size: 13px;
  font-weight: 100;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  bottom: 0;
  color: #fff;
  left: 0;
  width: 100%;
  padding: 8px;
  overflow: hidden;

.footer-controller {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

To see this in action, visit this link

I conducted a test without using bootstrap and it worked fine.

In summary, remember to utilize text-overflow: ellipsis; for the desired effect.

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

Using JavaScript to place image data on the canvas in an overlay fashion

I recently wrote the code below to generate a rectangle on a canvas: <!DOCTYPE html> <html> <body> <canvas id="myCanvas" width="300" height="150" style="border:1px solid #d3d3d3;"> Your browser does not support the HTML5 canv ...

Can a div be aligned in the center with an "absolute" parent element?

<style type="text/css"> .square { width:251px; height:207px; border: 1px solid #d6d6d6; -webkit-box-shadow: 1px 1px 3px rgba(0,0,0,.1); -moz-box-shadow: 1px 1px 3px rgba(0,0,0,.1); box-shadow: 1px 1px 3px rgba(0,0,0,.1); ...

Using jQuery to toggle sliding the information above a div

I am facing an issue with my customized sliding menu. The menu slides over the image but not over the content-div, pushing it aside. I have tried to fix this problem but haven't found a solution yet. My goal is for the menu to slide over all divs and ...

The alignment of the horizontal menu items is off

Currently, I am working with asp.net and dealing with a horizontal menu issue. The alignment problem arises where the right side of Menu B appears higher than the left one (Menu A). I have included my code below for reference. Any suggestions or assistance ...

Tips on elevating a dragged div above all other elements when utilizing two scrollbars

Currently, I have two horizontal scrollers where I need to drag a div from the upper scroller to the lower scroller. While this functionality is working properly, there is an issue with the dragged div getting lost under the borders of the scroller during ...

Creating a full-width navbar in Bootstrap 4 using the container-fluid

Looking for assistance with making a Bootstrap navbar fill the entire width of a container-fluid using only CSS, as I do not have access to the HTML code. It works outside the container-fluid but can someone help me achieve the same result within the con ...

AngularJS: The dynamic setting for the stylesheet link tag initiates the request prematurely

I'm encountering a problem that is somewhat similar (although not exactly the same, so please be patient) to the one discussed in Conditionally-rendering css in html head I am dynamically loading a stylesheet using a scope variable defined at the sta ...

Assistance Needed with XPATH and CSS for Selenium Automation

Can anyone assist me in finding the appropriate XPATH/CSS locator to extract text from the structure below? <div class="page-header song-wrap"> <div class="art solo-art"> <div class="meta-info"> <h1 class="page-title"> Zehnaseeb I ...

How to emulate sticky behavior for position: fixed in Vue2

Although many mobile browsers do not support <position: sticky>, using position: fixed is not ideal as it can overlap content at the bottom of the document. I believe that using jQuery to set a static position for the fixed block while scrolling to ...

Tips for showcasing embedded content in WordPress without the need for scrolling

I am in the process of building a website. The sidebar menu contains a list of pages and posts from my WordPress blog. Whenever I select a menu item, the content is displayed within one of the templates I have created in an Iframe. However, there seems to ...

Adjust the Vue.js background color according to a specified class name

Just starting out with vue.js and exploring the possibilities. I have a scenario where I need to dynamically change the background color based on a class name in vue. Is there a way to achieve this without relying solely on CSS? Ideally, I would like to si ...

Scrolling to ID or Anchor using jQuery: Automatically scrolls to the top if already at the designated section

I've been on a quest to uncover the cause and solution for this issue. Lately, I've been utilizing $("#content").animate({scrollTop:$(#elementId).offset().top-183}, 600); to achieve smooth scrolling to an ID within a <div>. The number 18 ...

Utilizing node_modules CSS imports in your webpack-powered Angular 2 application

Imagine we kick things off with this nifty starter pack: https://github.com/angularclass/angular2-webpack-starter Once we execute npm install and npm run start, everything runs smoothly. Now, let's say I want to incorporate an external css module, l ...

Moving a mouse from one element to another does not reset its state

Link to code: https://codesandbox.io/s/objective-darwin-w0i5pk?file=/src/App.js Description: There are four gray squares in this example, each with a different shade of gray. The goal is to change the background color of each square when the user hovers o ...

Bootstrap SideBar (Template): I desire for the sidebar to expand in the content area without the need for lengthy paragraphs below

After following an online tutorial to create a visually appealing sidebar, I made some adjustments to the code using Bootstrap 4 instead of the tutorial's Bootstrap 3. However, I encountered an issue where the navbar does not stretch to the right as e ...

Is there a way to adjust the width of a React.Image component while allowing the height to automatically adjust to preserve the aspect ratio?

Is there a way to define the width of a React.Image component while ensuring that the height adjusts automatically to maintain aspect ratio? I have attempted setting the height to 'auto' like so... imageStyle: { width: 400, height: ' ...

Pictures in the portfolio failing to load on Mozilla Firefox

Having some trouble with my WordPress website bmfconstruction.com.au/new/. In the project section, all images are loading correctly in Chrome, Opera, and IE. However, when it comes to Firefox, none of the images seem to be showing up. I've tested this ...

How to Load an External .CSS File Using Firefox

I've been diving into the world of CSS recently, learning how to integrate it with HTML. After scouring through numerous tutorials and solutions, it seems that Firefox is particular about character encoding. Even though I have set both files, the HTML ...

When hovering over A, the DIV element fails to appear

I'm encountering an issue with a specific page on my website () The problem lies with a .dropdown class that is supposed to display a DIV right below the header. In the source code, you can find it underneath <-- START DROPDOWN MENU -->. When I ...

The Bootstrap 4 dropdown button fails to expand properly within a table of fixed height

Is it possible to make a bootstrap 4 dropdown button function properly inside of a table with a fixed height for the tbody section? I am facing an issue where the button group menu does not pop out when the height is constrained. #table1 tbody {overflow-y ...