Bonjour,
J'ai essayé plusieurs méthode pour mettre ce bloc au centre de la page de façon vertical mais rien ne fonctionne (align-items-center, align-self-center). A l'horizontale aucun problème mais à la verticale ça ne veut pas!
Si quelqu'un à une solution car la je bloque totalement. Sinon je le ferais en pure CSS. Mais doit y avoir une solution avec boostrap.
Dans le block body, il y as une image et du texte.
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>{% block title %}Hello city{% endblock %}</title> {% block stylesheets %} <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"> {% endblock %} </head> <body > <div class="d-flex flex-column"> <div class="text-center"> {% block body %}{% endblock %} <footer> <p> © Copyright {{ 'now'|date("Y") }} · <a href="{{ path('app_about') }}">About us</a> </p> </footer> </div> </div> {% block javascripts %}{% endblock %} </body> </html>
Merci d'avance pour le coup de main
Partager