Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

208
Vistas
Flask - show flash messages in same place, not at top of page
{% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
                {% for category, message in messages %}
                    <div class="alert alert-{{ category }}"
                    style="margin-right: -500px; margin-left: -500px; text-align: center;">
                        {{ message }}
                    </div>
                {% endfor %}
            {% endif %}
{% endwith %}

I have an app which has a long page, when performing an action with a flash message, is it possible for the flash message to show in the current place, rather than going to the top of the page?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You can use position:fixed to make your div fixed on the page.

I have also made it to popup in center of page.

<div class="alert alert-{{ category }} "style="position:fixed; left: 50%; transform: translate(-50%, 0);">
                        {{ message }}
                    </div>
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda