The code is functioning well on Chrome, Firefox, and Microsoft Edge; however, it seems to encounter issues when running on Safari

I've been working on a website for my client that works perfectly fine in Chrome, Firefox, Microsoft Edge, and even Internet Explorer :P. However, I'm facing some issues with Safari. Here's a snippet of the code I used:

<html>
<head>
    <title>Welcome to Siyaram Developers</title>
</head>
<body>
<div id="overlay"></div>
<div id="background"></div>

... (Code continues)

JavaScript Code

<script>
        // JavaScript code goes here
    </script>

CSS Code

<style>
        /* CSS styling */
    </style>

Here's a screenshot of how the website looks in Chrome: https://i.sstatic.net/b5NZd.jpg

And here's how it appears in Safari: https://i.sstatic.net/iCMDF.png

Answer №1

Success at last! It took some time, but now I understand why my code was not functioning properly on Safari.

I had to meticulously test each line of my CSS code by commenting it out. Phew! But when I commented out:

width:100vw;
height:100vh;

I saw some progress. So, I decided to change it to:

width:100%;
height:100%;

And voila! It worked! Now I am unsure if vh or vw is supported in Safari because substituting % for vh and vw made my code work correctly.

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

"Enhance Your Website with a NodeJS HTML5 Audio Player for MPEG

We have encountered a situation where we are being provided with a direct link to an MPEG audio file from a specific web streaming API. The challenge is that the file is not a typical MP3 with an MPEG codec, but rather an MPEG video format containing only ...

A hyperlink unveils a visual and conceals its own presence

I'm a beginner in the world of coding and I have a question about creating a link that reveals a hidden image while hiding itself using HTML. After some research, this is what I've come up with: <a href="javascript: ...

Update the regular expression pattern to extract nested tags and store them in an array of objects

For my small application, I am working on creating a regex pattern to identify "faux" html tags. The goal is to capture these tags within curly brackets and output them into an array of objects. Below is the code snippet with the current regex pattern: { ...

Sending Data from jQueryUI Dialog to PHP using AJAX

I am struggling to retrieve the user inputs from text fields within a dialog window in order to utilize them for a SQL query. The issue I am encountering is that I am unable to effectively use the array in PHP. Despite no error messages being displayed, I ...

What is the method for displaying character entities on Fullcalendar when PHP is used to retrieve data from the database?

Currently, I am utilizing PHP to retrieve posts from WordPress (WP_Query()) in order to create Fullcalendar event strings. Everything functions properly, except for the issue with character entities, specifically apostrophes. In the Title field of the po ...

Ways to remain on the same page even after submitting a form

I've been searching for a solution to my specific issue for days, but haven't had any luck. Can anyone provide assistance? I have a form on my website that is supposed to send an email when clicked, while also converting the div from a form to a ...

Learning how to update a database using AJAX, jQuery, PHP, and MySQL can greatly enhance your web development

I am facing an issue with updating a database using AJAX without reloading the page. Even though I receive a success message after making the AJAX call, the database is not getting updated as expected. Here is my code: JS: $('.start-time-class' ...

What is the source of this error message "Exceeding maximum characters in string literal"?

Hey everyone! Sorry for the bother, but I'm a bit stumped on this issue. Within my view, I have the following code snippet: <fieldset> <dl> <dt> <label for="FormTypes">Form Type:</label> ...

Bootstrap datepicker embedded within a modal will scroll along with the parent page, rather than the modal itself

I recently encountered an issue with a bootstrap template where I needed to incorporate a datepicker within a modal. The modal contains scrollable content, but when I clicked on the datepicker field and scrolled the page, the datepicker moved with the pa ...

Reorder the Polymer dom-repeat element following a modification in the child component's value

My Polymer dom-repeat list is working fine on the initial value sorting for the children. However, when I update a value within a child element, the sort order of the list does not reflect the changes. What is the best way to achieve this? <body> ...

Using h1 tags in the code causes unnecessary blank space to appear above the

I'm having trouble with a basic issue and can't seem to figure it out. I have created a <div> for my header, inside of which there is another <div> containing an image (logo) and a title (<h1>). The problem arises when there is ...

What are some different CSS options for setting the indentation of the first line of

I've encountered an issue with how the <p> text-indent property appears when a page is printed using Internet Explorer's Active-X plugin. Here is the relevant CSS: p { font-family: Calibri; font-size: 20pt; line-height: 1.75em; margin-bot ...

Form returns to the original page even with return false in JavaScript

It appears that the #frmToDo still triggers postbacks. <form id="frmToDo" name="frmToDo"> ... <a id="btnSubmit" href="javascript:document.frmToDo.submit();">Add</a> google.load("jquery", 1); google.load("jqueryui", 1); google.s ...

Controlling the window opener; Inserting text into an element in the parent window

A pop-up window allows users to select files, then displays the selected image's URL. However, I need to take additional steps beyond that. I am seeking a method to input the URL into an input element on the parent window. window.opener.document.wri ...

The issue with Webpack chunking is that no content is appearing because the chunks are not

For the past day, I've been trying to resolve a frustrating yet seemingly simple problem. My goal is to split my bundle.js file into chunks to enhance website loading speed. Below is my webpack.config file: module.exports = { devServer: { historyApi ...

Can the Angular.js scope be maintained while also making changes to the template?

I am currently facing a challenge with my directive. In the snippet below, I am attempting to extract content from a template, append it to the layout, and then compile it: var $template = angular.element("<div></div>"); $template.append($co ...

Increase the count if the item is already in the shopping cart - React

Is there a way to avoid adding the same product to the basket multiple times and instead just increment a counter? How can I effectively keep track of each item's count? this.state = { description: '', commaSalesPrice: '', ...

Bootstrap 4: Ensuring consistent height for all rows

I'm having trouble creating a preloader with rows. I want to divide my grey rectangle into 3 rows, each with 33% height. Here's what I need: In the first row, a SVG logo In the second row, a loader In the third row, some text Here's the ...

Flask and Ajax make it easy to work with multiple datatables that are connected to

Currently, I am working with 2 datatables in my project. The first one is populated using the following code snippet: {% block scripts %} <script> $(document).ready(function () { $('#data').DataTable({ ajax: '/api/dat ...

Expanding Images with JQuery Accordion

I'm facing a problem where I need to include accordions on my website with images, but whenever the accordion is opened, the image ends up stretched. Is there a solution to prevent this from happening? Below is the code snippet I am using: [Fiddle] ...