What is causing this div to not be aligned at the bottom for iPhones?

It functions properly on desktop and android, but is not working correctly on mobile devices?

The CSS code used is as follows:

display:block;
position:absolute;
bottom:0px;
width:94%;
padding:15px 3% 0px 3%;
height:185px;
z-index:10;
background-color:#ffffff;
border-top: 1px solid #c9cfdd;
margin:0;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-transition-duration: .25s;
transition-duration: .25s;

The div is not contained within a wrapper and overlaps the content. On iPhone, it appears to be positioned about 50px above the bottom?

EDIT:

Using position: fixed resolves the issue, but why does position:absolute not work? I require position:absolute for other functionalities...

Answer №1

One option to consider is including this meta tag in your code

<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.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

What is the best way to retrieve the highest value from a CSS file for use in a .js controller in Sencha

Being new to the world of sencha touch, I am in the process of developing an application for iOS using sencha touch. In my app.css file, I defined a style for a label using the class "top". Here's what I tried: console.log(Ext.getCmp('location_l ...

CSS formatting may not be maintained when additional content is inserted after the initial text

Just a heads up, I'm relatively new to coding! I have a header and text that I want to overlay on a background image using CSS, so getting the positioning right is crucial. Everything was working fine until I added more HTML content below the text. ...

What is the best way to position a textarea and text input on top of each other alongside a radio button?

Currently struggling with the layout of a website project, specifically positioning a text input and a textarea above each other next to a larger radio box. I came across a similar issue on Stack Overflow but unfortunately, it did not solve my problem. Ide ...

position the div correctly above the table

I am currently working on creating a scheduler that has specific requirements: Show the working hours for each resource Show the interviews, allow changing the interview duration by resizing, and move the interviews using drag-and-drop functionality. I ...

CSS Priority - determining the ultimate winner

I have an upcoming exam and I'm reviewing the previous exam paper that was given to me. The question is: When multiple style sheet rules are applied to the same element, which type of rule takes precedence? a. Any declaration from the browser b. ...

Can flexbox be constrained to a grid while wrapping text?

Admiring the way this design wraps seamlessly while still maintaining aligned boxes on both sides, creating a visually appealing and fully utilized space. <head> <style> * { padding: 0px; margin: 0px; text-transform: none; font-style ...

Tips for eliminating the margin in a bootstrap navigation bar when hovering?

Here is the Navigation Bar that I customized, along with the CSS code I used to override the Bootstrap styling. Below are images showing the current output and the expected output. <div class="row fixed-top"> <div class="col-md-1"></div> ...

Jquery Enhancement for Navigation

Recently, I have implemented a header and footer navigation on my website. The header navigation consists of 1 UL (unordered list), while the footer navigation comprises 5 ULs. My goal is to align the first child of each UL in the footer navigation with th ...

What is causing Microsoft Edge to highlight this span and behave as though it's a hyperlink?

I am currently in the process of redesigning a website, and I've encountered an issue with the header markup. While the design looks fine on most browsers, it behaves strangely in Microsoft Edge on Windows 10. The phone number in the header is inexpli ...

developing a responsive website that can effortlessly adjust to any screen size, whether big or small

As I develop a website on my 13-inch MacBook, I encountered an issue with the background image being too large for my screen. Is there a way to maintain the aspect ratio while designing so that it looks consistent when scaled up or down? I tried using the ...

Implementing a vertical divider line in between columns with Foundation CSS

Here is the HTML code snippet: <link href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.0/css/foundation.min.css" rel="stylesheet"/> <div class="card"> <div class="card-section"> <section class="row"&g ...

Buttons are not aligned with the rest of the row's height

I'm currently working on designing an upload layout that consists of a container with a row inside. Within the row, there are two buttons (each containing input elements) and one h3. For some reason, I am having difficulty getting them to align at the ...

Placing two parent flex containers on top of each other

I'm in a situation where I have two .container elements, both set at a height of 50%. Within these containers are the child divs .element, which belong to their respective parent divs .container. The problem arises when applying media queries with f ...

Struggling to figure out Visual Studio Code - Having trouble loading images and fonts into my CSS file

It seems like I'm missing something here (just so you know, I'm totally new at this). I attempted to use fonts that are loaded on my computer for my CSS stylesheet (font file in my VSC), but no luck. I also tried using images from my files as bac ...

Utilize JQuery to create expand and collapse functionality for a div

Trying to decipher the intricacies of this JQuery code has been quite the challenge for me. I would normally opt for a different approach, but it seems I must adhere to this particular method. My main issue lies in getting the functionality right - when cl ...

Change the background color of a single row in the Foundation table using Angular

When displaying a list of users, I need to emphasize a specific row that corresponds to a user's current rank. However, I am facing an issue with ng-class as it does not appear to override the Foundation background-color for that particular row even w ...

Ensure that all elements with the :hover event have a text color of #fff in CSS

 Troubleshooting problems with block's child elements during the :hover event. Specifically, I have a pricing block where I want all texts to be of color #fff when hovered over. Currently, when hovering over the <h3> and <p> elements ...

IE7 disregards the margin set in a div after a div that has been positioned absolutely

Within a container, I have two divs - the first one with absolute positioning. Strangely, in IE7, the second div doesn't seem to acknowledge the top margin. Padding works fine, but for visual consistency, I prefer using margin. The culprit appears to ...

How can I modify the color of a jQuery Mobile Select menu?

Is there a way to dynamically modify the color (background and text) of a single select menu in jQuery Mobile, without impacting other elements with the same class? I've experimented with various approaches, such as: $('#select').css({color ...

Creating a responsive design for an absolutely positioned element

Currently, I am working on an image slider that features two arrow keys. The issue arises when I attempt to adjust the viewport to a smaller size. While the image slider responds by changing its size accordingly, the arrow keys do not follow suit. I am uns ...