Ad

Strange Box Shadow Behind Box

- 1 answer

So I have this box with a shadow, but when I close out the box and it hides, a different shadow is left behind. I can't fix this issue, and I can't tell where it's coming from. I attached the code that I had with it, all in the files and folders. I think it's an html error, but it also might be a css error. Run this in a browser other than Google Chrome, for it might won't load properly.

function popupClose() {
  $('#popup').hide();
}

$(function() {
  $('#content').text(myFunction());
});
// Above code was in a file called browser_detection in a folder named js

function validate() {
  var x = $('#in').val();

  if (navigator.userAgent.indexOf("Chrome") != -1) {
    $('.popup').css("display", "none");
  } else {
    $('.popup').load('html/popuphtml.html');
  }

}
window.onload = validate;
// Above code was in normal index.html
.overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  transition: opacity 500ms;
  visibility: visible;
  transition: all 600ms ease-in-out;
}
.overlay:target {
  visibility: visible;
  opacity: 1;
}
.popup {
  -moz-margin: 70px auto;
  -moz-padding: 15px;
  background: #eee;
  border-radius: 8px;
  -moz-width: 30%;
  text-align: center;
  box-shadow: 0 0 90px 80px #eee;
  z-index: 1;
  position: relative;
  transition: all 600ms ease-in-out;
}
.popup h2 {
  margin-top: 0;
  color: #333;
  font-family: Tahoma, Arial, sans-serif;
  text-align: center;
}
.popup .close {
  position: absolute;
  top: 10px;
  right: 20px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #555;
}
.popup .close:hover {
  color: #B00B0B;
  text-shadow: 0 0 3px #B00B0B;
}
.popup .content {
  max-height: 30%;
  overflow: auto;
  text-align: center;
}
@media screen and (max-width: 700px) {
  .box {
    width: 70%;
  }
  .popup {
    width: 70%;
  }
}
/* Above code was in browser_popup.css in css folder */
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<div class="popup">
  <h3>Loading...</h3>
</div>
<!-- Above code was in the normal index.html -->

<div id="popup" class="overlay">
  <div class="popup">
    <h3>Your browser at the moment is not supported for this website. Please use Chrome.</h3>
    <a class="close" target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="javascript:popupClose();">×</a>
  </div>
</div>
<!-- Above code was in a folder called popup.html in a folder called html -->

Ad

Answer

I think you are talking about .popup div shadow

There are two things in .popup class, first one is

background-color:#eee;

Second one is box shadow

box-shadow: 0 0 90px 80px #eee;

Please remove anything you which you didn't want from both

Thanks

Ad
source: stackoverflow.com
Ad