Bottom space gap issue in PhoneGap for Windows Phone

I am using phonegap for development and I am facing an issue with the styling.

My main concern is to position a footer at the bottom of the page.

This is how my index.html looks like

<!DOCTYPE html>    
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
    <link rel="stylesheet" type="text/css" href="css/index.css" />
    <title>Hello World</title>
    <script type="text/javascript" src="cordova-2.6.0.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
</head>
<body id="page">        
    <div id="bottom">
        <p>Bonjour</p>
    </div>
</body>
</html>

Below is my css code

#bottom {
position:fixed;
width: 100%;
bottom: 0px;
background-color: #f00;
}
body {
min-height: 533px;
height : 100%;
padding: 0;
margin: 0;
}

However, this is what I am getting:

Here is the result on the phone

If anyone has encountered a similar issue or can provide a solution, I would greatly appreciate it!

Thank you!

Answer №1

Verify the styling to ensure no additional styles are being applied automatically. Pay close attention to the style for the <p> element. Consider setting both margin and padding values to 0.

Answer №2

The initial problem was that the position fixed property wasn't functioning properly on Internet Explorer.

In order to solve this issue, I decided to incorporate jQuery into my project and changed the positioning to absolute instead.

#bottom {
position:absolute;
width: 100%;
bottom: 0px;
background-color: #f00;        
margin: 0px;
padding: 0px;
left: 0px;
}

Following these adjustments, I made modifications to my index.html file as well.

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />

    <link rel="stylesheet" type="text/css" href="css/index.css" />

    <title>Hello World</title>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css">
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/latest/jquery.mobile.js"></script>

    <script type="text/javascript" src="cordova-2.6.0.js"></script>

    <script type="text/javascript" src="js/index.js"></script>

</head>
<body>  
    <div id="bottom">
        <p>Bonjour</p>
    </div>
</body>
</html>

By making these changes, the functionality has been restored successfully.

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

showcasing recommended options in the search bar through the use of javaScript

Hey there, I've been working on creating result suggestions for my search bar. The generation process is all set, but I'm facing an issue with displaying the elements on the HTML page. During testing, I keep seeing ${resultItem.name}, and when I ...

The container div contains a pop-up that expands the height of the container, rather than overlapping on top

I am currently developing a grid system similar to Excel, but I am encountering issues with displaying pop-ups properly as the lower part gets cut off by the container div. This problem is reminiscent of a situation discussed in a Stack Overflow post titl ...

Tips for Aligning Images of Various Sizes in the Center of a div

My images are displayed in a horizontal line, but some have different sizes. I want to center all the images within their container div for a better look. Is there a way to do this automatically with CSS so that the images remain centered regardless of siz ...

A pair of large pillars perfectly aligned at the center in both horizontal and vertical position

Can anyone suggest an efficient way to design the following layout with responsiveness in mind? I attempted to divide the elements into sections and applied the transform property, but I encountered difficulties when trying to style the boxes on either si ...

Building a Table Using HTML and CSS

I'm currently tackling this school assignment and have hit a roadblock with two issues. The HTML Validation error I'm encountering is regarding a table row that is 5 columns wide, exceeding the established count by the first row (4). From line 7 ...

Using scale transformations to animate SVG group elements

I am currently experimenting with an SVG example where I hover over specific elements to expand or scale them. However, I seem to have made a mistake somewhere or missed something important. Can someone offer me assistance? View the demo on JSFiddle here ...

Utilizing the replace() function to add a highlighting effect to text in Django 2.1

I am currently working on a unique template filter that will enhance search results by highlighting keywords, similar to how Google search results are displayed. Here is the code for the custom filter: register = template.Library() @register.filter @stri ...

Chrome is refusing to animate until all the CSS files have finished loading

I'm facing an issue where I have a small CSS file for a loading animation included in my head section. While downloading a large Angular2 application, I want to display this loading animation. However, it seems that the animation doesn't start un ...

Using Material UI v1 to customize the widths of table columns

I am looking to configure column widths on a Material UI table using CSS, rather than within React with "classes." However, I am struggling to understand how the column widths are actually controlled. Despite trying to set widths on the TH columns, it does ...

Adjust the height of each table's data cell dynamically based on the content within

I have a table in HTML with a cell that contains 2 divs and a radial tab strip. Here is an example: <td> First td </td> <td> Second td <div> .... <div style="border: solid; border-color: brown; border-width: 3px; he ...

Adjust the table cell width to match the width of the ASP image

Below is the ASP image within a table cell: <tr> <td> <asp:Image runat="server" Width="64px" Height="64px" ImageUrl="~/Images/user64.png" /> </td> ...

Tips for creating a toggle menu using JavaScript

I am trying to create a toggle menu using CSS and JavaScript, but I have encountered an issue where clicking on the bars displays the navbar, but then the bars disappear and there is no option to close the navbar. <a href="#" class="fas ...

Creating a sleek and modern design using Bootstrap 3 that maximizes both width and height, featuring a 3

I've hit a roadblock with this basic webpage (I know it's not the most exciting project, but bear with me). I've been using Bootstrap for years, but now my manager wants it to be mobile-friendly. No matter what I try, I can't seem to ge ...

Body component of Bootstrap4 is not displaying

.navbar-btn { color: white; background-color: rgba(255, 255, 255, 0); } .navbar-btn:hover { color: skyblue; background-color: rgba(255, 255, 255, 0); } .dropdown-item { color: white; } .dropdown-item:hover { color: skyblue; back ...

Position the Facebook Like Button in alignment with the counts box

Is it possible to align the Facebook likes count box at the bottom of my Like Button on my website? I'm looking for help with this task. Here is a visual representation of how I want the fb button to be positioned or styled: ...

How to optimize Webpack settings for a Phonegap and React application?

I'm currently working on developing an Android/iOS app using Phonegap, with React being the framework of choice (not React Native). After configuring webpack to suit my needs, I noticed that when I run npm run build, the Android app viewer in Phonegap ...

What is the best way to implement CSS Float in typescript programming?

For a specific purpose, I am passing CSS Float as props. To achieve this, I have to define it in the following way: type Props = { float: ???? } const Component = ({ float }: Props) => {......} What is the most effective approach to accomplish this? ...

Creating an interactive star rating system with JSON data

Currently, I am in the process of developing a star rating system specifically designed for restaurant reviews. The 'Attributes' displayed on the user interface are dynamic and fetched in JSON format. There exist five attributes with each having ...

What is the best way to emphasize a column starting from the top and going down to the nth row

I'm working on a task to highlight columns and rows in a table from the top to the selected cell and from the left to the selected cell. Currently, I have achieved highlighting both the whole column and row. Here is an image of the desired outcome: ...

In Vue, it is not accurate to measure overflow

I am working on creating an overflow effect with tagging that fades out at the beginning to provide a subtle hint to users that there is more content. Here is what it currently looks like: https://i.stack.imgur.com/fXGBR.png To achieve this, I added a fa ...