Is it feasible to maintain a button in a fixed position even after performing zoom in or zoom out on a mobile device?

I have been working on a website with a fixed position button that works well on desktop. However, I am wondering if it is possible to keep the button in a fixed position even after zooming in or out on a mobile device. Alternatively, can the button be repositioned when zooming in or out?

CSS:

.exit {
    text-align:center;
}

.exit.btn{
    position: fixed;
    bottom: 40px;
}

HTML:

 <div class="exit">
     <a href="/" class="btn btn-blue">Exit</a>
 </div>

Answer №1

To set it up in this way:

<div class="container"> 
    <div class="row justify-content-center">
        <div class="col-lg-4 col-lg-push-6 text-center">
            <div class="exit-popup">
                <a href="/" class="btn btn-primary">Exit</a>
            </div>
        </div>
    </div>

By following this structure, the button container will remain intact when resizing your screen.

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

Step by step guide on transferring textbox value to hidden field

Within my GridView, there is a button at the bottom that allows users to add notes. Upon clicking this button, a pop-up window appears for users to input their note. It is essential for the system to retain the text of the note so that when the pop-up clos ...

Tips for accessing various JSON objects from a JSON document

My task involves extracting specific information from a JSON file using AJAX and jQuery. The structure of my JSON data is as follows: "Footwear": { "Adidas": [ { "id" : 0, &q ...

Scrolling Bootstrap tabs

Here is the code snippet provided below: JavaScript: var hidWidth; var scrollBarWidths = 40; var widthOfList = function(){ var itemsWidth = 0; $('.list li').each(function(){ var itemWidth = $(this).outerWidth(); itemsWi ...

Are there ways to implement Vue.js transitions without directly setting the height in the code?

I'm having an issue with a Vue app I created where I need to make an element expand and collapse when a button is clicked. I want the effect to be smooth and animated, but using the <transition> tag alone isn't working as expected. The prob ...

Resetting the datetime picker in Eonasdan/bootstrap-datetimepicker using an external JavaScript function

When using Eonasdan/bootstrap-datetimepicker version : 4.17.47, I encountered a scenario where after selecting a date from the datetimepicker and then clearing it using an onclick function, the previously selected date remains highlighted when reopening th ...

Troubleshooting: Custom HTML Attribute in Angular 8 Component HTML Not Functioning as Expected

I have a unique situation in my Angular 8 application where I utilize custom HTML attributes and then use jQuery to fetch those attributes for various styling purposes such as setting background images and adjusting the height of div elements. Below is th ...

Conceal an element along with its space, then signal the application to show alternative content using React

Greetings everyone! I seek assistance with a React Application that I am currently developing. As a newcomer to the Javascript world, I apologize if my inquiry seems trivial. The application comprises of two main elements: a loader, implemented as a React ...

Challenge with CSS3 designstyling

After creating a tag, I noticed that there is a white background after the arrow on the right side. .tags { list-style: none; margin: 0; overflow: hidden; padding: 0; } http://jsfiddle.net/eR8Ye/5/ Is there a way to eliminate the white backgro ...

Adding double quotes, where they haven't been added yet

I am trying to work with the following string (Very strong=="Very strong"?100:(Very strong=="Above Average"?75:(Very strong=="Average"?50:(Very strong=="Below Average"?25:(Very strong=="Cannot determine"?0:(Very strong=="Poor"?0:0)))))) My desired outpu ...

Visual showcase carousel

I'm not asking for direct code, but I need help turning the division below into a slider. When a user clicks, the current display should shift left, and a new but similar-looking division will appear. As someone new to website development, I would app ...

PHP file unable to access Bootstrap file

I have my bootstrap css file stored in the following directory: C:\Users\SCEA\Downloads\bootstrap-3.3.7\css When linking this css file to my php file, I used the absolute path: <link href="C:\Users\SCEA\Downl ...

Firebug displays the class name and location twice in the right panel

When examining a div labeled with .mlm-clearfix, I noticed that Firebug was displaying this class name and its URL twice in the right panel. The style declarations given for the Easy Clear Method in relation to this class are as follows: .mlm-clearfix:bef ...

Optimizing Mobile Content Alignment in Columns Using Bootstrap

I've been tackling the challenge of creating a mobile-optimized website with the latest Bootstrap grid system. My goal is to have two columns side-by-side in medium and large screens, but stacked on top of each other in extra-small and small screens. ...

What is the best way to keep my bottom navigation bar attached to my top navigation bar?

I am facing an issue with my two navbars. The top navbar sticks to the top of the page when the user scrolls down, which works perfectly fine. However, when the user logs in, the bottom navbar becomes visible. Unfortunately, the bottom navbar is not sticky ...

Leveraging jQuery to extract numerous concealed data from a webpage based on their names

Here is the scenario: <input type="hidden" name="uID" id="uID" value="251|0"> <input type="hidden" name="uID" id="uID" value="252|0"> <input type="hidden" name="uID" id="uID" value="253|0"> <input type="hidden" name="uID" id="uID" val ...

jQuery ajax issue: Unable to locate file using relative path

I have recently transferred some script from an HTML document to an external file. I updated the jQuery path to point to the new location of the JavaScript file, but now it is unable to locate the necessary PHP file. Can anyone shed light on why this might ...

difficulty generating a tooltip

Purpose: My main goal is to implement a tooltip feature where hovering over text triggers the display of a tooltip. To achieve this, I am seeking inspiration from an example on w3schools which can be found at this link. Current Implementation: render() { ...

Creating interactive checkboxes dynamically using form data - a step-by-step guide

Scenario When a user fills out an order form, they have the option to choose a bike type and select from the corresponding options available for that bike type. Current Issue I am facing a situation where I need to include a checkbox with all possible op ...

A JointJS element with an HTML button that reveals a form when clicked

How do I bind data to a cell and send it to the server using the toJSon() method when displaying a form on the addDetail button inside this element? // Custom view created for displaying an HTML div above the element. // ---------------------------------- ...

The font sizes appear larger when styled with HTML compared to using Photoshop

When I view my <nav> element in Chrome, the font size of each list element appears much larger than it was originally designed in Photoshop. The font is displaying 23px wider in Chrome compared to Photoshop, even though my resolution is set at 72dpi ...