Название bootstrap неправильно напечатано на смартфоне - PullRequest
0 голосов
/ 24 марта 2020

Я занимаюсь разработкой собственного веб-сайта / приложения, но у меня есть проблема с отображением заголовка. Край веб-браузера находится на переднем плане и скрывает мой заголовок (пожалуйста, посмотрите на картинку с красным прямоугольником, чтобы понять). Исходный код ниже. Я что то делаю не так? Я использую Bootstrap. Должен ли я добавить CSS?

<body>
    <div id="divformulaire">
        <h3>HERE IS MY PROBLEM:</h3>
      <form method="post" action="requetes/creerMission.php" role="form" id="formulaire">
          <hr/>
            <input class="form-control" id="nothing1" name="nothing1" type="text" placeholder="Nothing" required>
          <hr/>
          <input class="form-control" id="nothing2" name="nothing2" type="text" placeholder="Nothing" required>
          <hr/>
          <input class="form-control" id="nothing3" type="number" name="nothing3" placeholder="Nothing" required>
          <hr/>
          <input class="form-control" id="nothing4" type="text" name="nothing4" placeholder="Nothing" required>
          <hr/>
          <input class="form-control" id="nothing5" type="text" name="nothing5" placeholder="Nothing" required>
          <hr/>
            <input class="form-control" id="nothing6" type="number" name="nothing6" placeholder="Nothing" required>
            <hr/>
            <span class="label label-default">Nothing</span>
            <select class="form-control form-control-sm" id="nothing7" type="text" name="nothing7">
                <option>Non</option>
                <option>Oui</option>
            </select>
            <hr/>
            <div class="form-group">
            <label for="annonce">Nothing</label>
                <textarea class="form-control" id="nothing8" name="nothing8" rows="3"></textarea>
            </div>
            <button class="btn btn-lg btn-primary btn-block" id="create" type="submit">Nothing</button>
        </form>
    </div>

</body>

Проблема названия

1 Ответ

0 голосов
/ 24 марта 2020

Ваша проблема в том, что у вашего div с идентификатором #divformulaire нет никакого поля сверху. Если вы хотите, чтобы заголовок всегда был виден, вам нужно сместить весь div примерно на величину верхней панели браузера, где находится URL.

#divformulaire {
margin-top: 50px}
<body>
    <div id="divformulaire">
        <h3>HERE IS MY PROBLEM:</h3>
      <form method="post" action="requetes/creerMission.php" role="form" id="formulaire">
          <hr/>
            <input class="form-control" id="nothing1" name="nothing1" type="text" placeholder="Nothing" required>
          <hr/>
          <input class="form-control" id="nothing2" name="nothing2" type="text" placeholder="Nothing" required>
          <hr/>
          <input class="form-control" id="nothing3" type="number" name="nothing3" placeholder="Nothing" required>
          <hr/>
          <input class="form-control" id="nothing4" type="text" name="nothing4" placeholder="Nothing" required>
          <hr/>
          <input class="form-control" id="nothing5" type="text" name="nothing5" placeholder="Nothing" required>
          <hr/>
            <input class="form-control" id="nothing6" type="number" name="nothing6" placeholder="Nothing" required>
            <hr/>
            <span class="label label-default">Nothing</span>
            <select class="form-control form-control-sm" id="nothing7" type="text" name="nothing7">
                <option>Non</option>
                <option>Oui</option>
            </select>
            <hr/>
            <div class="form-group">
            <label for="annonce">Nothing</label>
                <textarea class="form-control" id="nothing8" name="nothing8" rows="3"></textarea>
            </div>
            <button class="btn btn-lg btn-primary btn-block" id="create" type="submit">Nothing</button>
        </form>
    </div>

</body>
...