Tips for implementing vertical scrolling in a Windows 8 app when in snapped view

Currently, I am developing a Windows 8 application using Html, CSS, and JavaScript. Upon entering snapped view, certain screens are unable to display the entire content, leading me to seek a solution for vertical scrolling.

Is there a way to address this issue using html or CSS?

HTML:

<section aria-label="Main content" role="main">
        <div class="divContainer" style="width: auto; height: auto; overflow:auto; display: -ms-grid; 
            -ms-grid-columns: 450px 50px 450px 46px 250px; 
            -ms-grid-rows: auto">
            <div id="pageCalc">
                <h2>User information</h2>
                ... 
                Some text here
                ...
            </div>
            <div id="pageText">
                <h2>Contact information</h2>
                ...
                Some text here
                ...
                <img id="imageDiv" src="/images/aboutlogo.png" border="0" alt="">


            </div>
            <div id="pageAdd">
                ...
                An add here
                ...
            </div>
        </div>
    </section>

The dimensions and styling of #pageText, #pageAdd, and #pageCalc are specified in the css code. In snapped view, the following snippet is utilized:

CSS:

@media screen and (-ms-view-state: snapped) {
.about section[role=main] {
    margin-left: 20px;
    margin-right: 20px;
}

.divContainer {
    height:1080px;
    width: 230px;
    display:-ms-grid;
    -ms-grid-column: 230px;
    -ms-grid-row: auto 20px auto 20px auto;
    overflow: auto;

}

#pageCalc, #pageText, #pageAdd {
    width: 230px;
}

#pageCalc {
    -ms-grid-column: 1;
    -ms-grid-row: 1;
}

#pageText {
    -ms-grid-column: 1;
    -ms-grid-row: 3;
}

#pageAdd {
    -ms-grid-column: 1;
    -ms-grid-row: 5;
}

}

Answer №1

Developing Win8 applications with html, css, and JavaScript involves utilizing the Microsoft WWA Host process, which operates on an internet explorer-based rendering platform. To create your application, follow similar steps as you would for IE. Simply encase your snapped content in a div with a specified height and include overflow: auto to enable vertical scrolling.

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

Creating stunning 3D animations using Canvas

I am knowledgeable about Canvas 2D context, but I would like to create a 3D animation similar to this example. Would using the Three.js library be the most suitable option for this type of animation? Any recommendations for tutorials or documentation tha ...

Set the scroll position to the top left corner (0,0) when a link to the current route is clicked or pressed

In my React application, I am faced with a challenge. When the user is on the route /gallery/images and clicks on a link (such as <a> or <Link> from react-router-dom) that leads to the same route currently being displayed, how can I detect thes ...

Import Socket.io into your Node.js application using the import statement

Can't seem to figure out why I keep encountering this error. Everything works perfectly when I use the request method instead. import express from 'express'; import { createServer } from 'http'; import * as io from 'socket.io& ...

The canvas game's animation can only be activated one time

I am currently working on designing a straightforward canvas game: Here is the code snippet located on CodePen var canvas; var ctx; var x = 300; var y = 400; var r = 0; var mx = 0; var my = 0; var WIDTH = 600; var HEIGHT = 400; function circle(x,y,r) ...

Using jQuery's .html() method will remove the selected attribute from the dropdown menu option

When generating HTML dynamically, a select element is included. After choosing an option inside it, everything works fine. For example: <div id="test"> <select> <option value="1">1</option> <option value="2" selec ...

The issue with EJS Header and Footer not showing up on the

I am currently building a basic todo list application using EJS. However, I am encountering an issue when running it. I would like to run app.js with the header and footer in EJS, but it seems that it is not recognizing the header despite using what I beli ...

Tips for transforming intricate JavaScript arrays into a unified array and iterating through to create a table

I need help combining two arrays that contain objects and reassigning the values in a standard format. Can anyone provide some guidance? Thank you. Here is my current situation: array1 = [{Apple: Ken, Orange: Mary, Melon: Tina, Strawberry: Jessica, Mango ...

Compiling Directives in AngularJS for Faster Page Loading

I'm currently experiencing performance issues in my Angular application. The root cause seems to be the excessive use of a directive on a single page. Unfortunately, I don't have the time to break down this page into multiple sections. I am seek ...

Can one look through a div to the one beneath it by moving the cursor?

Hey there! I have a unique question for you. I've been trying to achieve a specific effect where two divs are stacked on top of each other, and the content of the lower div is only revealed in a certain area around the cursor. Is it possible to make o ...

What causes images to be omitted from a PDF file when using mywindow.print()?

Here is the scenario I am dealing with: On a particular webpage, there is a print button. The page contains various information, including receipts. When the user clicks on "print", I want only the receipts to be printed: https://i.sstatic.net/WobKK.png ...

Preventing the occurrence of numerous ajax requests or halting ongoing requests

Currently, I am utilizing the flotchart plugin to track user interactions on a chart and retrieve additional information from a database based on the chart value. For instance, if a user hovers over a specific date like "24 May," an AJAX call is triggered ...

"What is the best way to choose a color in a ColorPicker component using

Using the CirclePicker component from react-color, I have a modal window that includes a form with a ColorPicker. The form contains information about the current color in hex format (#123123) that is sent to it. I want to pre-select the chosen color when ...

Enhance your tooltip pie chart in echarts4r by incorporating additional variables

Currently, I am in the process of creating a doughnut chart with echarts4r. As I delve into adding a custom tooltip to enhance the user experience, I have successfully referenced examples from Stack Overflow on stacked area charts (Echarts4r : Create stack ...

Move the displayed output in a two-dimensional space

Explore this straightforward example showcasing a cube centered at the world's origin. The camera captures the cube directly, making it appear in the center of the rendered 2D image with only its front face visible. I desire the ability to adjust the ...

Refreshing the browser does not load the Angular2 component and instead shows a 404 error

During my exploration of Angular 2, I developed a basic restaurant management application. Now, I am delving into more advanced techniques such as creating an app bundle, minification, and optimizing the application. The authentication component in my app ...

Next.js Image staying at the forefront

Currently, I am utilizing Tailwind CSS to style my Next.js website and incorporating the Next.js Image element for an image on the page. My goal is to display a modal over the existing page without completely blacking out the background; instead, I want i ...

The TypeScript inference feature is not functioning correctly

Consider the following definitions- I am confused why TypeScript fails to infer the types correctly. If you have a solution, please share! Important Notes: * Ensure that the "Strict Null Check" option is enabled. * The code includes c ...

Changing the structure of a JSON array in JavaScript

I'm currently developing an ExpressJS application and I need to send a post request to a URL. My data is being retrieved from a MS SQL database table using Sequelize, and the format looks like this: [ { "x":"data1", "y":& ...

Efficient Ways to Present and Personalize Indian Date and Time using JavaScript

Hey there, currently creating my website and need some assistance. I'm looking to display the date and time in different sections of the page. Having some trouble with getting Indian time to work properly using PHP. If you could help me out with Ja ...

Node.js Module's function is having trouble with exporting

I'm currently working on creating utility functions in Python and I am familiarizing myself with Node.js. However, I am facing an issue where a function is not exporting properly; it keeps saying "SaveJson is not a function". exports.mySaveJson = fun ...