Внезапно нижний колонтитул привязывается к нижней части экрана, а не к нижней части страницы. - PullRequest
0 голосов
/ 29 мая 2020

При тестировании веб-страницы, о которой идет речь, нижний колонтитул привязывается и отображается в нижней части экрана. Требуется, чтобы он был привязан к нижней части страницы.

Использование того же кода нижнего колонтитула и CSS также на других веб-страницах. Я не сталкивался с подобными проблемами при тестировании на них.

Проблема возникла только сейчас только на этой веб-странице при использовании функции «инспектировать» в Google Chrome для проверки отзывчивости.

Очистил кеш браузера и перезапустил браузер. Проблема все еще остается.

@charset "utf-8";

/* The footer is fixed to the bottom of the page */

footer {
  position: fixed;
  bottom: 0;
}

@media (max-height:800px) {
  footer {
    position: static;
  }
  header {
    padding-top: 40px;
  }
}

.footer-distributed {
  background-color: #000000;
  box-sizing: border-box;
  width: 100%;
  text-align: left;
  font: bold 16px sans-serif;
  padding: 50px 50px 60px 50px;
  margin-top: 80px;
}

.footer-distributed .footer-left,
.footer-distributed .footer-center,
.footer-distributed .footer-right {
  display: inline-block;
  vertical-align: top;
}


/* Footer left */

.footer-distributed .footer-left {
  width: 30%;
}

.footer-distributed h1 {
  color: #ffffff;
  font-family: "Century Gothic";
  font-size: 72px;
  margin: 0;
}


/* The company logo */

.footer-distributed .footer-left img {
  width: 30%;
}

.footer-distributed h3 span {
  color: #e0ac1c;
}


/* Footer links */

.footer-distributed .footer-links {
  color: #ffffff;
  margin: auto;
}

.footer-distributed .footer-links a {
  display: inline-block;
  line-height: 1.8;
  text-decoration: none;
  color: inherit;
  font-family: "Century Gothic";
}

.footer-distributed .footer-company-name {
  color: #8f9296;
  font-size: 14px;
  font-weight: normal;
  margin: 0;
  font-family: "Century Gothic";
}


/* Footer Center */

.footer-distributed .footer-center {
  width: 35%;
}

.footer-distributed .footer-center i {
  background-color: #33383b;
  color: #ffffff;
  font-size: 25px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  text-align: center;
  line-height: 42px;
  margin: 10px 15px;
  vertical-align: middle;
}

.footer-distributed .footer-center i.fa-envelope {
  font-size: 17px;
  line-height: 38px;
}

.footer-distributed .footer-center p {
  display: inline-block;
  color: #ffffff;
  vertical-align: middle;
  margin: 0;
  font-family: "Century Gothic";
}

.footer-distributed .footer-center p span {
  display: block;
  font-weight: normal;
  font-size: 14px;
  line-height: 2;
}

.footer-distributed .footer-center p a {
  color: #e0ac1c;
  text-decoration: none;
  ;
}


/* Footer Right */

.footer-distributed .footer-right {
  width: 30%;
  font-family: "Century Gothic";
}

.footer-distributed .footer-company-about {
  line-height: 20px;
  color: #92999f;
  font-size: 13px;
  font-weight: normal;
  margin: 0;
}

.footer-distributed .footer-company-about span {
  display: block;
  color: #ffffff;
  font-family: "Century Gothic";
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
}

.footer-distributed .footer-icons {
  margin-top: 25px;
}

.footer-distributed .footer-icons a {
  display: inline-block;
  width: 35px;
  height: 35px;
  cursor: pointer;
  font-size: 20px;
  color: #ffffff;
  text-align: center;
  line-height: 35px;
  margin-right: 3px;
  margin-bottom: 5px;
}


/* Here is the code for Responsive Footer */


/* You can remove below code if you don't want Footer to be responsive */

@media (max-width: 600px) {
  .footer-distributed .footer-left,
  .footer-distributed .footer-center,
  .footer-distributed .footer-right {
    display: block;
    width: 100%;
    margin-bottom: 40px;
    text-align: center;
  }
  .footer-distributed .footer-center i {
    margin-left: 0;
  }
}
<footer class="footer-distributed">

  <div class="footer-left">
    <img src="img/footerlogo.jpg">
    <h1>Pear</h1>
    <p class="footer-links">
      <a href="Index.html">Home</a> |
      <a href="PearStore.html">Store</a> |
      <a href="Gallery.html">Gallery</a> |
      <a href="News.html">News</a> |
      <a href="ContactUs.html">Contact Us</a> |
      <a href="AboutUs.html">About</a>
    </p>
    <p class="footer-company-name">© 2020 Pear Technologies Pvt. Ltd.</p>
  </div>

  <div class="footer-center">
    <div>
      <p><span>No.555, Sri Jayawardanapura Road,</span> Colombo, Sri Lanka.</p>
    </div>

    <div>
      <p>+94 11-2000000</p>
    </div>
    <div>
      <p><a href="mailto:support@pear.lk">support@pear.lk</a></p>
    </div>
  </div>
  <div class="footer-right">
    <p class="footer-company-about"> <span>Our Company</span> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
    <div class="footer-icons">
      <a href="https://www.facebook.com/"><img src="img/facebookicon.png" height="30"></a>
      <a href="https://twitter.com/"><img src="img/twittericon.png" height="30"></a>
      <a href="https://www.instagram.com/?hl=en"><img src="img/instagramicon.png" height="30"></a>
      <a href="https://www.youtube.com/"><img src="img/youtubeicon.png" height="30"></a>
    </div>
  </div>
</footer>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...