A
A
Alexander Bondarenko2019-02-20 23:23:44
css
Alexander Bondarenko, 2019-02-20 23:23:44

Bootstrap 4 modal not showing on mobile site, how to fix it?

5c6db9685231d444764602.jpeg
When testing in the browser, everything is correct, but on the phone itself, a gray background appears, but the window itself is not displayed, how to fix it?

<div class="container">
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel"><?=$_GET['title']?> </h4>
                </div>
                <div class="modal-body">
                    <div>
                        <div class="container">
                            <div class="row">
                                <div>
                                    <center>
                                        <h1>Оформите заявку</h1></center>
                                    <div class="tab" role="tabpanel">
                                        <!-- Tab panes -->
                                        <form class="form-horizontal" method="post" action="success.php">
                                            <input type="hidden" name="title" value="<?= htmlspecialchars($title) ?>">
                                            <input type="hidden" name="year" value="<?= htmlspecialchars($year) ?>">
                                            <input type="hidden" name="spec" value="<?= htmlspecialchars($spec) ?>">
                                            <div class="form-group">
                                                <label for="name">Имя</label>
                                                <input type="text" class="form-control" id="name" name="name" required="">
                                            </div>
                                            <div class="form-group">
                                                <label for="phone">Телефон</label>
                                                <input type="phone" class="form-control" id="phone" name="phone" required="">
                                            </div>
                                            <div class="form-group">
                                                <button type="submit" class="btn btn-default">Заказать</button>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>

                        </div>
                        <!-- /.col-md-offset-3 col-md-6 -->
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Закрыть</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Bondarenko, 2019-02-21
@bond_1013

Maybe it will help someone, I removed the fade class in class="modal fade", and it all worked

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question