Updating Old FAQ Addon
Posted: Sun Jan 29, 2023 10:40 am
I have been updating an old faq addon and have the admin side sorted but I am just having a few display issues on the catalog side.
When I have only 2 questions the page displays just fine but 3 or more questions starts to break the layout.
as seen here http://phoenix-demo.co.uk/faq.php
Can aynone see what I am missing as I have tried opening/closing <divs> but just break the page even more
When I have only 2 questions the page displays just fine but 3 or more questions starts to break the layout.
as seen here http://phoenix-demo.co.uk/faq.php
Can aynone see what I am missing as I have tried opening/closing <divs> but just break the page even more
Code: Select all
<div>
<h1 class="display-4"><?php echo HEADING_TITLE; ?></h1>
<?php
$result_query = tep_db_query("SELECT faq_id, question, answer FROM faq WHERE visible='1' and language='" . tep_db_input($language) . "' ORDER BY v_order");
if (mysqli_num_rows($result_query)) {
?>
<div class="accordion" id="accordionFaq">
<?php
while ($faq = $result_query->fetch_assoc()) {
?>
<div id="heading<?= $faq['faq_id'] ?>">
<div class="mb-0"><button class="btn btn-link px-0 mx-0 shadow-none" type="button" data-toggle="collapse" data-target="#collapse<?= $faq['faq_id'] ?>" aria-expanded="true" aria-controls="collapse<?= $faq['faq_id'] ?>"><?php echo $faq['question']; ?></button></div>
</div>
<div id="collapse<?= $faq['faq_id'] ?>" class="collapse" aria-labelledby="heading<?= $faq['faq_id'] ?>" data-parent="#accordionFaq">
<div>
<?php echo '<hr>' . $faq['answer'] . '<hr>'; ?>
</div>
</div>
</div>
<?php
}
}
?>