Answer №1

The issue here lies in the lack of responsiveness in your text. As your image size decreases, the font size remains constant, causing a misalignment. It's crucial for everything to be in harmony for an accurate layout. To address this problem, you must adjust and calculate values accordingly.

.invoice {
            position: relative;
        }
        .balance {
            position: absolute;
            bottom: 14%;
            right: 14%;
            font-size: 2vw;
        }


        @media only screen and (max-width: 768px) {
            .balance {
                bottom: 14.2%;
            }
        }
        
        @media only screen and (max-width: 500px) {
            .balance {
                bottom: 14.5%;
            }
        }
<div class="invoice">
        <img style="width: 100%" src="https://i.sstatic.net/odI4u.png" alt="">
        <span class="balance">10000</span>
    </div>

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

Cannot overflow a long flex div within parent div in CSS-Tailwind to achieve sliding effect

In the div with a class of scroll-content, I have a long list of images that I want to hide under a scroller div. My goal is to create a slide effect using arrow buttons. However, the flex box expands beyond 100% of the container. This issue arises within ...

Unable to access POST data from AJAX request in an external PHP script

I've exhausted all my options searching online, but I still can't figure out how to retrieve data from a POST array in an external PHP file. Here is the HTML code for the text field: <form> <textarea id="comment_text_area" name="comment ...

Concealing the Placeholder of Div Elements in TinyMCE

I've incorporated TinyMCE into my custom TextBox and TextArea, but I'm struggling to display a placeholder within these elements. Initially, I attempted to implement a placeholder, which worked when TinyMCE was inactive. However, once activated, ...

Automatically log users out of Django and update the backend after a period of inactivity without requiring any additional requests

In my Django project, I am working on a simple multiplayer system where I need to update the isCurrentlyActive value in a user-related model automatically and then log them out. I tried using middleware following a solution from this post, which works well ...

Why isn't this basic CSS animation executing properly?

I have encountered an issue and I have created a JSFiddle to demonstrate it. http://jsfiddle.net/sqMT6/1/ Basically, when you click on a paragraph, the 'hidden' class is supposed to be set, triggering a webkit animation that makes the paragraph ...

The CSS grid header is malfunctioning on Chrome and Opera, while functioning correctly on Firefox

My first attempt at creating a website layout using grid was successful in Firefox, but not in Chrome and Opera. The header is taking up only about 1/3 of the width, leaving the rest empty on these browsers. However, everything else, including the mobile l ...

Why is the code to check if the user has scrolled to the bottom not working in Chrome but working in Microsoft Edge?

I have been using this code to determine if a user has scrolled to the bottom of a page, but I've run into some issues specifically with Google Chrome. Surprisingly, the code works flawlessly on Microsoft Edge. On Google Chrome, when I scroll to the ...

Is it possible to change the input type of 'time' to a string when utilizing ng-change in AngularJS?

Is there a way to convert a time input into a string or a timestamp for Firebase support? For instance, the code below will not function correctly due to the time input type. HTML <html ng-app='app'> <head> <script src="http ...

Vue.js appears to disrupt the functionality of Bootstrap pagination

I am currently working on implementing pagination in vueJS and I have set up my pagination markup as shown below: <nav aria-label="Page navigation example"> <ul class="pagination"> <li class="page-item"> <a class="page-lin ...

Experimenting with animating a snackbar in Svelte by incorporating distinct animations for its entrance and exit effects

My current objective is to create a snackbar component with a Material-esque design that will emerge from the bottom of the screen and blur out once dismissed. Here is my current implementation: <script lang="ts"> import '../css/sn ...

What is the process for transforming specific words within a sentence into clickable links?

In my experience with React, I faced the challenge of creating links within a string. After experimenting with various approaches, I finally discovered a solution without having to manipulate the DOM directly. function generateProfile() { const hashtagRe ...

Adjusting video size in carousel (Bootstrap 4.0)

My school project requires me to create a website with a video slider, and I decided to use Bootstrap 4.0 for this task. I have successfully implemented a template from Bootstrap, but I am facing an issue with the video not fitting properly within the slid ...

Outlook failing to recognize text dimensions

Implementing: <html> <head> <style> p { font-size: 16px; } .font-size-16 { font-size: 16px !important; } </style> </head> <body> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspend ...

Integrating a footer into the enhanced search tab slider

I'm struggling to create a sticky footer like the one on w3schools. Even though I used the same code in my material UI demo, it's not functioning properly. I tried debugging by changing the position from fixed to absolute, but it still isn&apos ...

What could be causing the margin class to malfunction in Bootstrap?

I'm in the process of designing a webpage for my website and I want to remove any margin on the left or right side of my paragraph completely. However, it appears that the margin class isn't having any effect. <div class="p-5 ml-0" i ...

Update the text inside a div when the value of an input changes using JavaScript

Here is the code snippet I am working with: <script> $(function() { $( "#slider-vertical" ).slider({ orientation: "vertical", range: "min", min: 0, max: 100000, step: 5000, value: 5000, slide: function ...

Locating items based on checkboxes and dropdown selection

My goal is to calculate the sum of certain numbers based on checkboxes and a select option. Below is the code I am using: <div class="container"> <select> <option value="1">1</option> <option value="2">2</option> <o ...

The usage of element h5 inside element span is not permitted in this context

Here is my code: <span> <h5>Standard Page Template</h5> <ul> <li>1 Design Concepts</li> <li>1 Free Round of Revisions</li> <li>5 Day Turnaround</li> <li>Photoshop Source File</li> < ...

Tips for showcasing a complete background image in a div even if the content inside is minimal

Check out the header image on ink.talentosoft.com if you get a chance. The height of the header image is precisely 388 px. I am looking to have the background of this div fully displayed. Currently, the setup for the div looks like this: background: url ...

Issue with Ajax calendar extender not displaying full calendar due to being cut off

I've implemented the Ajax calendar extender with my own custom CSS classes. The styles are being applied correctly, but I'm encountering an issue. When the calendar at the bottom of the page opens, it gets cut off at the bottom due to the restric ...