Unique design elements can be seen between emulators/cellphones and notebooks

My attempt to create a responsive design resembling a table using vh and vw units for height and width is facing some challenges. The goal was to have 5 rows and 3 columns. Initially, the design looked good on both mobile phones and notebooks with just two rows. However, adding a third row caused the design to break on notebooks, while it remained aesthetically pleasing on mobile devices.

Here's the HTML code:

<!DOCTYPE html>
<html lang = "de">
    <head>
        <title>Test</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta charset = "utf-8">
        <link rel = "stylesheet" href = "./css/style.css">
    </head>
    <body>
        <div id = 'reihe1'>
            <div id = 'spalte1reihe1'>
            </div>
            <div id = 'spalte2reihe1'>
            </div>
            <div id = 'spalte3reihe1'>
            </div>
        </div>
        ... (Code snippet continues)

And here's the CSS code:

* { box-sizing: border-box;}
... (CSS rules continue)

Upon validating the code, no errors were found, leaving me puzzled as to what might be causing the issue. You can view the problem by visiting this link.

Thank you for your assistance!

Answer №1

Here's a solution for you:

body {
  width: 100vw;
  overflow-x: hidden;
}

Most browsers (except Firefox) wrongly interpret 100vw as the total page width, including the vertical scroll bar, leading to a horizontal scroll bar appearance when overflow: auto is defined.

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 personalized dots in the owl carousel

I have successfully added custom previous and next buttons to my carousel using Owl Carousel, but I am having trouble displaying the navigation dots. Can anyone help me identify where I might have made a mistake? // owl.carousel.css .owl-controls { ...

Is it acceptable to utilize a UUID as an HTML tag ID without encountering any problems?

I need to handle dynamic content accessible through an index on a side panel. When a user selects an element from the side panel, I use the ID to determine which data they're requesting so that I can generate the corresponding content for the main sec ...

CSS file from outside does not impact the appearance of buttons

Take for instance this button: <input class="btn btn-primary btn-block btn-lg register_btn rounded-0 submit-button" type="submit" value="Submit"> and the CSS code within a custom custom.css file: .submit-button { ...

Design a grid-like layout using flexbox styling

I am looking to design a form using a table-like structure similar to what we typically do with HTML. The image below shows the basic layout I am aiming for: https://i.sstatic.net/H6b3f.png. Can anyone provide guidance on how to code this type of structu ...

IE 8 behaves in varying ways depending on the computer it is used on

Why might IE 8 behave differently on two separate machines? Specifically, when visiting this site: One machine experiences the issue of the "X" disappearing and not being able to minimize a slideshow after maximizing it. However, on another machine, even ...

The refined search parameters do not appear on the OpenCart theme

Recently, while managing my online shop using the opencart cms, I decided to enhance the search functionality by adding filters to my products. I followed a tutorial that guided me through the process: link to tutorial After implementing two filters for s ...

Adding a stylish underline to text using HTML and CSS

Looking for some assistance with my Html and CSS website project. I am currently facing a challenge trying to place a border below the text as shown in the provided image. Below is the snippet of my Html code: <div class="Sectionheading"> ...

Troubleshooting Issues with Mathematical Equations in SCSS File Using Angular CLI

I don't have much familiarity with the .scss syntax. I am working with angular CLI and using the .scss extension for my css files. My goal is to determine the background-color value conditionally. @function getBgColor($value) { $modular: #{$val ...

What is the best way to adjust the size of the browser window when opening my page?

I have created a single page scrolling website specifically designed for children. The optimal viewing experience is at 1200 pixels wide. Is there a method to set the window size to that by default when visitors land on the site? ...

A step-by-step guide on changing the class of a focused contenteditable element with a button click using jQuery

I need assistance changing the class of an element within a contenteditable div. Here is my current code: <button>swap class</button> <div contenteditable="true"> <h1 class="line-height-1">Your Headline Here</h1> </di ...

Make the height of the CSS div fill the remaining space and allow scrolling once the maximum height of the screen is reached

I've scoured the internet high and low for a solution to my problem, but I just can't seem to find anything that fits my needs perfectly. The answers I have come across are either outdated or not quite what I'm looking for. I'm really h ...

Display the element once the class enters the viewport

I am attempting to display a div only when certain elements with a specific class are visible in the viewport. I made progress with this example: http://jsfiddle.net/blowsie/M2RzU/ $(document).ready(function(){ $('.myclass').bind('inv ...

Toggling javascript functionality based on media queries

On one of my slides, I want to display images that are specific to different devices like iPhone, iPad, and desktop. I am looking for a way to filter these images based on the device. Using display:none won't work as it's JavaScript, but here is ...

Adjust the size of an image instead of formatting text to fit around it when the browser window is resized

Is there a way to make an image scale down instead of having text wrap around it when the browser window is resized to be more narrow? Currently, the text wraps under the image before the image scales due to its max-width property. The desired outcome is ...

The image is not displaying on the button

When using 3 buttons in my extjs script, I noticed a strange issue where the buttons were not visible on the page. Upon inspecting the elements using firebug, here is what I found: <button id="button-1051-btnEl" class="x-btn-center" autocomplete="off" ...

Add a variable's value as a key to an array

I am working with an array: let pages = new Array(); My goal is to add data from my pages to this array in the following way: $('li.page').each(function () { let datatype = $(this).attr('data-type'); let info = $(this ...

Experience the full functionality of Google Maps API without the need for jQuery or PHP with PanTo

I'm not a developer and I find myself stuck in the panTo() function. All I want is to execute this function with an if-else statement without having to reload the Google Map or using jQuery. <body> <div id="map"></div> <d ...

Troubleshooting Incorrect Image Alignment in Pygame: Solutions and Fixes

While trying to position my hovering image next to my mouse pointer, I want it to be exactly on the mouse cursor instead of slightly separated from it. You can see an example in this VIDEO EXAMPLE. Currently, the image is displayed next to the mouse pointe ...

Leveraging SVG filters for enhancing text with unique borders

I recently discovered a helpful tip on adding a background to text in SVG using a source. However, I am still unsure how to incorporate a border around the text. <svg width="100%" height="100%"> <defs> <filter x="0" y="0" width="1" ...

How to automatically close a Bootstrap modal after submitting a form

I am facing an issue with a Bootstrap modal dialog that contains a form. The problem is that when I click the submit button, the form is successfully submitted but the modal dialog does not close. Here is the HTML code: <div class="modal fade" ...