I have a form that responds with a welcome message, but that welcome message does not apply any style and I do not know how to put it or where the fault is. This is my code:
if(mail($emailA,$headers,$contenido)) {
$mensajeExito = '<div class="alert alert-success"><strong>Mensaje enviado con éxito</strong>, pronto nos pondremos en contacto.</div>';
}
else {
This would be the PHP form and then in my CSS stylesheet I have these styles to apply:
.alert {
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.alert-success {
background-color: #dff0d8;
border-color: #d0e9c6;
color: #3c763d;
}
Where would the error be? Why do not you read any style I put it as I put it? I have also tried putting / "but the result is the same without styles.
The answer of echo
I have here printed:
<div id="error"><? echo $error.$mensajeExito; ?></div>
I forgot to put it before. This is inside the form so that the response of the message comes out.