Absolute bottom positioning does not work properly in Edge and IE

I have an icon that is absolute, located in bottom: 50px, while this works fine in every browser, exceptions and IE are exceptions. I understand that Microsoft browsers have a lot of problems and how they look different. Here I see that the browser treats the midpoint of the section 100vhas the bottom. I need help to put the icon in IE and Edge in the same way as in Chrome, Opera and Firefox. Thank.

IE and Edge

enter image description here

Chrome, Firefox, Opera

enter image description here

HTML

.content1 {
  height: 100vh;
  width: 100%;
  position: relative;
  top: 0;
  z-index: 99;
}


/* this is the icon I was talking about */

.dropdown_blue1 {
  width: 25px;
  padding: 20px;
  position: absolute;
  margin: auto;
  z-index: 99;
  left: 0;
  right: 0;
  bottom: 50px;
}
<div class="content1"><img class="dropup_blue1" src="../assets/dropup_blue.png" alt=""><img class="dropdown_blue1" src="../assets/dropdown_blue.png" alt=""></div>
Run codeHide result
+4
source share
3 answers

, margin: auto; margin: 0 auto;

.content1 {
      height: 100vh;
      width: 100%;
      position: relative;
      top: 0;
      z-index: 99;
}
.dropdown_blue1 {
      width: 25px;
      padding: 20px;
      position: absolute;
      margin:0 auto; /* change here */
      z-index: 99;
      left: 0;
      right: 0;
      bottom: 50px;
}
<div class="content1">
   <img class="dropdown_blue1" src="../assets/dropdown_blue.png" alt="">
</div>
Hide result
+4

! margin-left: auto; margin-right: auto; margin: auto;

0

I had a similar problem with two browsers, the absolute position was crazy. In the styles section I had.

td.Cir  {width:7in; height:7in; background-image:url('clock.png'); 
  background-size: 45%; background-position: center; 
  background-repeat:no-repeat; position:relative; font-size:28pt;
  min-width:7in; max-width:7in; text-shadow: -1px 0 blue, 0 1px blue,
  1px 0 blue, 0 -1px blue;}

In the table I had

</td></tr><tr><td class='Cir'>...</td><td>...</td></tr>

I changed the code to

<table><tr><td class='Cir'>...</td><td>...</td></tr></table>

and Edge and IE are now working fine

0
source

Source: https://habr.com/ru/post/1673566/


All Articles