Issues with Safari browser's HTML overflow-x not functioning as expected

I'm having trouble with this code, it's not behaving as expected on Safari. Any ideas on how to fix it?

html {
  overflow-x: hidden;
}

The overflow-x: hidden property isn't functioning correctly for me.

Answer №1

For those encountering CSS problems, consider trying out these hacks based on the version of Safari you are using:

These hacks proved to be quite helpful for me in resolving various CSS issues.

Latest Safari versions (7.1+):

_::-webkit-full-page-media, _:future, :root .safari_only {
  prop:value; 
}

/* For Safari 10.1 and above */

@media not all and (min-resolution:.001dpcm) { @media {
    .safari_only { 
         prop:value;
     }
}}

/* For Safari version 6.1-10.0 (10.1 being the latest) */

@media screen and (min-color-index:0) and(-webkit-min-device-pixel-ratio:0) { @media {
    .safari_only {
        prop:value; 
    }
}}

/* For Safari version 6.1-7.0 */

@media screen and (-webkit-min-device-pixel-ratio:0) and (min-color-index:0) {  
   .safari_only {(;
       prop:value; 
    );}
}

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

Some web browsers do not support video html5, except for Google Chrome

Not all browsers support HTML5 video, with the exception of Google Chrome. In Firefox, there may be a message saying "No video with supported format and MIME type found." To embed a video in your page, you can use the following code: <video width="3 ...

CSS Menu Not Functioning Properly on iPad While Scrolling is Required

My CSS dropdown menu has mouseout and mouseover events but I'm experiencing issues on iPads and iPhones. The menu automatically closes when scrolling, making it difficult to open any links unless the menu is short enough to avoid scrolling. Does anyon ...

Tips for positioning a div within a grid:

Looking for help with displaying news on your CMS page? You may have encountered an issue trying to show the title and content in two columns within a row. Here is some CSS code that might guide you in the right direction: *{ margin:0; padding:0; ...

Adjusting the minimum width of columns in Bootstrap can impact the responsiveness of your design

Upon upgrading from Bootstrap 4.4 to 4.5, I noticed a change in the responsiveness of cards within columns on my website. Previously, these cards would adjust accordingly when the screen size was smaller, but now they seem to overlap each other. This issu ...

Creating a loading animation using HTML and CSS for textual content

I came across a website that had a unique text loading effect, but despite my efforts, I couldn't find what it's called. Effect: https://i.stack.imgur.com/NyaSN.png Is there any plugin or CSS file available for this effect, similar to Bootstra ...

Ensure each checkbox within a list is selected

My dilemma involves an assortment of checkboxes enclosed within LIs and SPANs in an unordered list. To simplify the checking process, I attempted using jQuery to automatically check all boxes when a button positioned above the UL is clicked. However, my ...

Trouble getting CSS text alignment to function properly

I attempted to apply text-align using CSS, but it doesn't seem to be working as expected. I have set the body alignment to center as well. Could this be causing an issue? Below is my CSS: #Swell { text-align: left; } Here is the HTML code: < ...

What is the method to alter the fill of a circle using CSS when it is hovered over in JavaFX?

I am seeking assistance for a task involving a circle within an hBox. I would like the color of the circle to change when the mouse cursor hovers over it. Is there a way to accomplish this using JavaFX and CSS? If not, what is the recommended approach fo ...

Ensure that the CSS property has fully transitioned before verifying the change

Currently, I am working with Python webdriver and facing a challenge in making the system wait until the border color of a password field changes after clicking on a submit button. The transition happens from one color to another, and I have managed to ach ...

Styling with CSS in Django templates

Having trouble with CSS in my Django template, My settings.py looks like this: BASE_DIR = os.path.abspath(os.path.dirname(__file__) + '/') STATIC_URL = BASE_DIR + '/static/' I have a folder called "static/css/home_css.css" in my path ...

Difficulty encountered in setting margin to 0 in Bootstrap 4 framework

Upon observation, I found that setting margin: 0px had no effect. Even after specifying a margin of 0 for left and right, the screenshot still displayed the margin. https://i.sstatic.net/mkYsO.png Initially, I checked for any conflicting classes or IDs c ...

Tips for shutting down an open section within a jQuery Accordion?

I am having trouble closing the active panel using jQuery. The rest of my code is functioning perfectly, but for some reason, I can't get the active panel to close. Currently, the code is working correctly in that only one panel can be open at a time ...

The selected text on the webpage is not showing up highlighted

Encountering an unusual issue that is challenging to comprehend and difficult to find a solution for using Google search. I have created a website with multiple web pages. Each page follows the same format: header with links at the top, content area in th ...

Position the center div within the parent div and ensure it overlays another child div as well

For my chess game, I want to display a message in the middle of the screen when a player wins, such as "White Wins," etc. The current setup is as follows: <div> <p> White Wins <p/> <div/> This message share the parent div with a ...

When attempting to print using React, inline styles may not be effective

<div styleName="item" key={index} style={{ backgroundColor: color[index] }}> The hex color code stored in color[index] displays correctly in web browsers, but fails to work in print preview mode. Substituting 'blue' for color[index] succe ...

Pseudo Elements: The Transformative Power of Before and After

JS Fiddle Looking for some CSS help: <div id="strip"></div> This is my setup: width: 100%; height: 130px; background: grey; I'm trying to add a pseudo-element after the strip, positioned at the bottom. #strip:after { content: "" ...

Styling with CSS in Angular 2+ can be quite challenging

Hey there, I'm new to Angular 4 and running into some troubles with styling my application. I tried adding a background image to the body, which worked fine, and then added a component to display content, also looking good. Now, when I added a second ...

The modals are all tangled up and now spilling over the edges

The modals in the project seem to have stopped working for some unknown reason. They were functioning properly a few days ago, but now they appear to be broken. The container div is overflowing. Here is a snippet of HTML code I have been using since the ...

Utilizing CSS for modifying spacing within a span element

I am facing a challenge with displaying a full name (firstName lastName) on a webpage. Within my JSP file, the code snippet looks like this: <span> <c:if test="${someCondition1}"> <c:out value="${firstName}"> </c:if&g ...

Angular 8 UI not displaying mockAPI data as expected

My mockAPI is successfully fetching the data, but the json response structure is quite complex. It looks something like this: [ { "planList": [ // plan details here ] } ] Everything in the UI is displaying correctly, except ...