CSS - falla sweet alert2

 
Vista:
sin imagen de perfil

falla sweet alert2

Publicado por Hugo (7 intervenciones) el 11/03/2022 03:15:14
Hola, buenas noches amigos.

Estoy trabajando con sweet alert2 y no me doy cuenta porqué en algunos de mis formularios el alerta que devuelve lo hace con la imagen desfasada, por ejemplo el mensaje de error no es una cruz perfecta, ya que no se intercepta en su punto medio, adjunto la imagen para que se aprecie y entienda mejor.

Le he dado vueltas al asunto pero no encuentro el motivo de esto.
Si alguien me puede ayudar le estaría muy agradecido, ya que me esta enloqueciendo.

Adjunto el código.
Desde ya muchas gracias.

mensaje-error-sweet-alert

prueba.php:

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<html>
	<head>
		<title>Intranet</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
		<link rel="stylesheet" type="text/css" href="../Cabecera/cabecera.css">
		<link rel="stylesheet" type="text/css" href="../Internacion/internacion2.css">
		<link rel="stylesheet" type="text/css" href="matrimonio.css">
		<link rel="stylesheet" type="text/css" href="formularios.css">
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
		<link rel="preconnect" href="https://fonts.googleapis.com">
		<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
		<link href="https://fonts.googleapis.com/css2?family=Kaisei+HarunoUmi:wght@500&display=swap" rel="stylesheet">
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.11.0/sweetalert2.css"/>
		<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.11.0/sweetalert2.js"></script>
	</head>
	<body>
		<?php
			include ("../Conexion/conexion.php");
		?>
		<div id="Logo">
			<img src= "../logo.jpg" class="soc"/>
		</div>
		<div id="Cabecera">
			<?php
				require ("../Login/iniciar_session.php");
			?>
			<?php
				//error_reporting(E_ERROR | E_WARNING | E_PARSE);
				date_default_timezone_set("America/Montevideo");
				if(isset($_POST['ingresar'])){
					$usuario=$_SESSION['usuario'];
					$nom=$_SESSION['nombre'];
					$ape=$_SESSION['apellido'];
					$seccion=$_SESSION['seccion'];
					$tipo='Matrimonio';
					$desde=$_POST['desde'];
					$hasta=$_POST['hasta'];
					$fecha1=new DateTime($_POST['desde']);
					$fecha2=new DateTime($_POST['hasta']);
					$control_fecha= $fecha1->diff($fecha2);
					$dia=intval('1');
					$control_fecha2=$control_fecha->days + $dia;
					$pendiente='Pendiente';
					$extrae_año=strtotime($desde);
					$anio = date('Y', $extrae_año);
 
					//Calculo para los días de anticipación de solicitud
					$fecha_actual=date('Y-m-d');
					$fecha1= new DateTime($fecha_actual);
					$fecha2= new DateTime($_POST['desde']);
					$diff = $fecha1->diff($fecha2);
					$dif=$diff->days;
 
					$anticipacion=intval('5');
 
					$total_dias="SELECT SUM(cantDias) as cantDias FROM licespec WHERE numFunc='$usuario' && tipoLic='$tipo' && anioDesde='$anio'";
					$query_suma=$conexion->query($total_dias);
					$array_suma=$query_suma->fetch_assoc();
					$total_suma=$array_suma['cantDias'];
 
					$registro="INSERT INTO licespec(numFunc,nombre,apellido,seccion,tipoLic,fechaDesde,fechaHasta,cantDias,fechaSolicitud,anioDesde,estado) VALUES ('$usuario','$nom','$ape','$seccion','$tipo','$desde','$hasta','$control_fecha2',NOW(),'$anio','$pendiente')";
 
					if($dif<$anticipacion){
						echo "<script>
								function alerta(){
									swal({
										title: 'Ups...!',
										text: 'La fecha para ingresar tu solicitud expiró, recuerda que debes hacerlo con al menos 5 días de anticipación.',
										type: 'error',
										}).then(function(){
											window.location='matrimonio.php';
										});
								}
										alerta();
								</script>";
						exit();
					}
 
					if($desde<$fecha_actual){
						echo "<script>
								function alerta(){
									swal({
										title: 'Ups...!',
										text: 'La fecha para ingresar tu solicitud expiró, recuerda que debes hacerlo con al menos 5 días de anticipación.',
										type: 'error',
										}).then(function(){
											window.location='matrimonio.php';
										});
								}
										alerta();
								</script>";
						exit();
					}
 
					//Verifico que no haya una solicitud para ese día
					$total_dia="SELECT fechaDesde FROM licespec WHERE numFunc='$usuario' && tipoLic='$tipo' && fechaDesde='$desde' && anioDesde='$anio'";
					$total_verif=mysqli_num_rows($conexion->query($total_dia));
 
					if($total_verif>0){
						echo "<script>
									function alerta(){
										swal({
											title: 'No se ingresará su solicitud',
											text: 'Ya existe una solicitud para el día seleccionado, por favor verifique.',
											type: 'info',
											}).then(function(){
												window.location='matrimonio.php';
											});
									}
								 alerta();
						</script>";
						exit();
					}
 
					if($fecha2<$fecha1){
 
						echo "<script>
								function alerta(){
									swal({
										title: 'Error!',
										text: 'La fecha desde debe ser igual o mayor a la fecha hasta.',
										type: 'error',
										}).then(function(){
											window.location='matrimonio.php';
										});
								}
										alerta();
								</script>";
						exit();
 
					}
					if($control_fecha2>5){
						echo "<script>
								function alerta(){
									swal({
										title: 'Error!',
										text: 'Los días solicitados deben ser iguales o menores a 5.',
										type: 'error',
										}).then(function(){
											window.location='matrimonio.php';
										});
									}
										alerta();
									</script>";
								exit();
 
					}
 
					//sumo el total de días tomado en el año
					$total_dias="SELECT SUM(cantDias) as cantDias FROM licespec WHERE numFunc='$usuario' && tipoLic='$tipo' && anioDesde='$anio'";
					$query_suma=$conexion->query($total_dias);
					$array_suma=$query_suma->fetch_assoc();
					$total_suma=$array_suma['cantDias'];
 
					$total= $control_fecha2+$total_suma;
 
					if($total>5){
						echo "<script>
								function alerta(){
									swal({
										title: 'Ups...!',
										text: 'Ya tienes '+$total_suma+' días tomados en el año '+$anio,
										type: 'error',
										}).then(function(){
											window.location='matrimonio.php';
										});
									}
										alerta();
									</script>";
								exit();
					}
 
					if($control_fecha2>5){
						echo "<script>
								function alerta(){
									swal({
										title: 'Ups...!',
										text: 'No puede ingresar un período mayor a 5 días',
										type: 'error',
										}).then(function(){
											window.location='matrimonio.php';
										});
									}
										alerta();
									</script>";
								exit();
						}else{
 
					if(!$resultado=$conexion->query($registro)){
						echo "No se pudo ejecutar la consulta a la base de datos";
						exit;
						}else{
							echo "<script>
									function alerta(){
										swal({
											title: 'Solicitud ingresada con éxito!',
											text: 'Recuerde que debe presentar comprobante de internación para validar su solicitud.',
											type: 'success',
											}).then(function(){
												window.location.href='//localhost/Universal2/index.php';
											});
									}
								 alerta();
						</script>";
						exit();
						}
					}
 
 
				$conexion->close();
			}
			?>
		</div>
 
		<div id="Contenido">
 
		</div>
		<div id="cont-form">
				<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" class="form">
					<div class="formulario">
						<h2 class="titulo"></h2><br><br>
						<div class="fechas" >
							<span>Desde:
							<input type="date" name="desde" class="fecha" required/></span>
							<span class="Hasta">Hasta:
							<input type="date" name="hasta" class="fecha" required/>
							</span>
						</div>
						<br>
						<input type="submit" value="Ingresar" name="ingresar" class="ingresar">
					</div>
				</form>
		</div>
	</body>
</html>

internacion2.css:

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
*{
	box-sizing:border-box;
}
body{
	background-color:020640;
}
#contenido{
	background-color:020640;
	height:auto;
}
#cont-form{
	position:absolute;
	left:20%;
	top:38%;
	width:60%;
}
 
.titulo{
	padding:20px;
	background-color:3F4048;
	color:white;
	font-size:25px;
	font-weight:100;
	border-top-left-radius:10px;
	border-top-right-radius:10px;
	border-bottom: 5px solid;
}
.form{
	margin: 0 auto;
	width:80%;
	height:auto;
	top:32%;
	background-color:020640;
	border-radius:10px;
	border:3.5px solid;
	color:white;
	opacity:0.95;
}
input{
	margin:8px;
	margin-bottom:25px;
	padding:6px;
	border-radius:10px;
	font-family: 'Kaisei HarunoUmi', serif;
	font-weight:600;
	font-size:90%;
	color:black;
	width:9%;
	text-align:center;
	box-sizing:border-box;
	font-size:15px;
 
}
input:focus{
	background-color:C7D8EE;
 
}
p{
	margin-left:3%;
	font-family: 'Kaisei HarunoUmi', serif;
	font-weight:500;
	font-size:90%;
	color:white;
}
 
.fondo{
	position:relative;
	left:0%;
	width:100%;
	height:auto;
}
.fecha{
	width:auto;
}
 
.descripcion{
	position:relative;
	left:10%;
	width:70%;
	height:25%;
}
.pre{
	height:7%;
}
.lib, .pre, .prod{
	margin:8px;
	margin-bottom:25px;
	padding:5px;
	border-radius:10px;
	font-family: 'Kaisei HarunoUmi', serif;
	font-weight:600;
	font-size:90%;
	color:black;
	width:9%;
	text-align:center;
}
.ingresar{
	width:28%;
	height:10%;
	color:white;
	font-family: OpenSans;
	font-size:22px;
	background-color:0B16BB;
	border:20px;
	border-radius:20px;
	position:relative;
	left:32%;
	text-align:center;
}
h2{
	text-align:center;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

matrimonio.css:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
span{
	font-size:18px;
	margin-left:7%;
}
.Hasta{
	margin-left:30px;
}
.ingresar{
	width:35%;
 
}
@media only screen and (max-width:1024px){
.fechas{
	display:flex;
	flex-direction: column;
	position:relative;
	left:12%;
}
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder