Troubleshooting a CSS Problem with Safari

I am experiencing an issue where a box with a hover overlay does not display correctly on Safari browsers (desktop and mobile). The styles such as width, height, and padding are not applied properly initially. Oddly enough, when I toggle these styles off and then back on using the inspector tool, everything corrects itself. I have verified that there is no CSS inheritance problem as Safari seems to be following the defined rules correctly. Even adding !important to the styles does not resolve the issue. Refer to the code and images provided below for more details.

HTML


<div class="col-md-5 hla-building-col animated fadeInUp" style="height:350px;background-image:url(/placeholder.jpg)">
   <div class="overlay text-center">
      <h3>Karma</h3>
      <p>Sitting right in the heart of it all...</p>
      <a>Learn More</a>
   </div>
</div>

CSS


.hla-building-col {
  padding: 0;
  box-shadow: -1px 0px 50px -6px rgba(102,103,102,1);
}    
.hla-building-col .overlay {
  background-color: rgba(255,255,255,.9);
  width: 80%;
  height: 40px;
  padding: 8px 15px;
  margin: 0 auto;
  transform: translateY(165px);
  transition: all 600ms ease;
}
.hla-building-col:hover .overlay {
  width: 100%;
  height: 100%;
  padding: 100px 15px;
  /**** EDIT: Properties above are not rendering ****/
  margin: 0 auto;
  transform: translateY(0);
  /*     transition: all 600ms ease; */
  animation-duration: 1s;
  animation-name: slidein;
}
.hla-building-col .overlay p, .hla-building-col .overlay a {
    opacity: 0;
}
.hla-building-col:hover .overlay p, .hla-building-col:hover .overlay a {
    opacity: 1;
    transition: all 1000ms ease;
    transition-delay: 1000ms;
}


@keyframes slidein {
  from {
        width: 60%;
    height: 40px;
    transform: translateY(165px);
    padding-top: 8px;
  }

  to {
    width: 100%;
    height: 100%;
    transform: translateY(0);
    padding-top: 100px;
  }
}

https://i.sstatic.net/YJSDH.png

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

Tips for choosing every <div> within a specific class

I'm trying to create multiple boxes within a class, all with the same background color. I've written code for 6 boxes in the "color-board" class, but when I go to select them, only 1 box is displaying... Below is the code for the class and how I ...

Expanding HTML zones to reach the bottom of the screen, while implementing top and side menus using the latest HTML5 and CSS techniques

Struggling to design a page layout with two navigation sections (top and left) similar to the example below: The light gray area represents where the main content will be displayed on each page. On the left side is the secondary navigation menu that shoul ...

What measures can we take to prevent text from dropping to the next line when neighboring text wraps around to multiple lines?

Make sure to review the problem statement in the plnkr linked below. http://plnkr.co/edit/ojt3l3ljNYOA6HDq .d { width: 200px; background: red; text-align: center; >div { display: inline } } .a { float: left; } .c { float: right; ...

Troubleshooting Problems with CSS Span Placement

Challenges with Span Positioning in CSS Currently, I am encountering difficulties while working on the index.html.erb file for an example Rails website. Below is a snippet of the HTML code I am struggling with (please note that this is simply a fabricated ...

What is the best way to eliminate the excess height in my <li> element?

I'm a little unsure about how to articulate my question, so I'm just going to share the code: body { background-color: #232026; background-image: url('galaxy16cropped.jpg'); background-position: center top; background-repeat: ...

Aligning multiple items to the right using Flexbox

While it's common knowledge how to align one item to the right in flexbox, what about aligning multiple items, like the last two elements, to the right and the rest to the left? Take a look at this example where I want elements with the class .r to be ...

Resizing popups upon button activation

Hey there! I have a popup with a button that reveals random text containing between 0 to 32 words when clicked. The issue is, the popup keeps resizing based on the length of the text, causing the button to move around. Is there a way I can keep the button ...

The behavior of a fixed position in Flexbox varies when comparing Chrome to Safari and Firefox

In Chrome, the following code works as expected, with the list element positioning itself at the very left of the .PageContainer when scrolling down. However, in Safari and Firefox, the list element positions itself just after the logo. Are there any CSS r ...

What is the best way to showcase the dropdown menu items of a bootstrap navbar in a horizontal layout instead of vertical?

While utilizing Bootstrap 4, I encountered an issue with the dropdown section where the items are displayed vertically instead of horizontally. I want these dropdown items to be arranged horizontally next to each other. <nav class="navbar navbar-expand ...

Expand the width of the image to fill the entire screen

I have been working on trying to insert an image into my header element. However, when I test it using Live Server, the image doesn't fully fill the width of the container. Update: The dimensions of the image are 899.875 x 600. Below is my CSS and H ...

``CSS: Styling a Rounded Div with a Clipped Scrollbar

I am attempting to contain a scrollbar within a div so that it remains within the rounded corners without overflowing. Take a look at the code snippet below to see the problem in action. Is there a way for the scrollbar to be fixed in its position, while ...

Need help aligning a column class perfectly in bootstrap?

I'm currently learning Bootstrap 3 and I have some HTML code that looks like this: <ul class="row> <li class="col-lg-3 col-md-3 col-sm-3 col-xs-6"></li> <li class="col-lg-3 col-md-3 col-sm-3 col-xs-6"></li> .. </ul ...

A guide to implementing div wrapping in HTML

I'm in the process of using flexbox on my website. I have 10 div elements that I want to wrap around each other closely without any gaps between them. My goal is to have "4" positioned to the right of "1", instead of creating a new row and moving dow ...

Achieve vertical centering of items without relying on absolute positioning or flexbox

I am struggling to align three divs vertically without using position:absolute or flexbox, as they will affect other elements on the page that I cannot control. Here is the current code snippet: <div class="search-wrapper text-center " ...

What is the best way to create a personalized image as the background in WordPress using CSS for a client?

I have this in my style.css .showcase{ background: url("x.jpg") no-repeat 0; } My website is built on WordPress and I have implemented advanced custom fields for the client to edit text. However, I am struggling to find a way for them to change the ...

Can I combine the col and d-flex classes in Bootstrap 5 without breaking any rules?

Is it possible to use both col and d-flex classes together? I want to center the element with the class "description" by combining them. <section class="container-fluid mb-5"> <div class="row"> <div class=&q ...

Fixing a menu hover appearance

I recently encountered a small issue with the menu on my website. When hovering over a menu item, a sub-menu should appear. However, there seems to be a slight misalignment where the submenu appears a few pixels below the actual menu item. Check out the w ...

Flipping a 2-dimensional box using CSS and incorporating cascading flex divs

*Please read the note: This question is a bit lengthy as I wanted to explain my thought process. For those who prefer not to read everything, I have created codepens for easy reference. Essentially, I am looking to achieve CSS box flipping effects like t ...

Jquery cascading menu

I'm currently experiencing difficulties in creating dropdown menus using jquery and css. Below is my HTML code: <nav class="topNav"> <ul> <li> <a href="#menu" class="menu-toggle"><img src ...

How to style multiple tags using CSS

Is there a way to style specific tags in CSS? <style type="text/css"> [attribute*="test"] { background-color: red; } </style> However, this method does not seem to work for the following tags: <test-1> </test-1> <t ...