Как я могу исправить мой аккордеон, перекрывающий мой нижний колонтитул в теме Shopify parallax? - PullRequest
0 голосов
/ 05 апреля 2019

Мой Аккордеон перекрывает мой нижний колонтитул при падении.Как я могу сделать так, чтобы страница расширялась, когда мой аккордеон сворачивался и не перекрывал мой нижний колонтитул?(Shopify parallax theme)

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

.accordion {
  background-color:white;
  color:#444;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid black;
  outline: none;
  transition: 0.4s;
}


.accordion:hover {
  background-color: #ccc;
}


.panel {
  padding: 0 18px;
  background-color: white;
  display: none;
  overflow: auto;
}

.accordion:after {
  content: '\FF0B'; /* Unicode character for "plus" sign (+) */
  font-size: 20px;
  color: #777;
  float: right;
  margin-left: 5px;
}

.active:after {
  content: "\2212"; /* Unicode character for "minus" sign (-) */
  font-size:20px;
}

''''

 .footer {
    margin-top: 0;
    padding: 0;
    background-color: {{ settings.sub_footer_color }};
    color: {{ settings.sub_footer_text_color }};
    {% if settings.custom_footer %}
      background-image: url("{{ settings.custom_footer | img_url: '2000x' }}");
      {% if settings.footer_bg_stretched %}
        background-repeat:no-repeat;
        background-attachment:fixed;
        -webkit-background-size:cover;
        -moz-background-size:cover;
        -o-background-size:cover;
        background-size:cover;
      {% else %}
        background-repeat:{{ settings.footer_repeat_bg }};
      {% endif %}
    {% endif %}
        }

''''

<div id="navigation">
<input type="hidden" name="demo2" />
<script type="text/javascript">
var acc = document.getElementsByClassName("accordion");
var i;

for (i = 0; i < acc.length; i++) {
  acc[i].addEventListener("click", function() {
    /* Toggle between adding and removing the "active" class,
    to highlight the button that controls the panel */
    this.classList.toggle("active");

    /* Toggle between hiding and showing the active panel */
    var panel = this.nextElementSibling;
    if (panel.style.display === "block") {
      panel.style.display = "none";
    } else {
      panel.style.display = "block";
    }
  });
}
...