JavaScript - Problemas con padding-bottom en Google maps

 
Vista:
Imágen de perfil de Susana

Problemas con padding-bottom en Google maps

Publicado por Susana (3 intervenciones) el 01/10/2022 20:08:00
Hola, estoy aprendiendo programación y hay veces que no me aclaro.
He incrustado un mapa de Google maps en mi web.
El problema lo tengo con el padding-bottom.
Si lo quito, el mapa no se me ve.
Si lo bajo, es el mapa lo que se hace más pequeño.
Lo tengo a 50%, pero claro, queda mucho margin por debajo hasta el siguiente container y queda fatal. He probado para contrarrestar, subir el margin-top del siguiente container pero al hacer la pantalla más pequeña, se me monta con el contendor de abajo y tampoco queda bien.
¿Qué puedo hacer?

Os adjunto el código de la página:

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
<!DOCTYPE html>
<html lang="es">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE-Edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Reservas</title>
 
	<!-- Javascript -->
	<script src="main.js"></script>
 
	<!-- Hoja de estilos -->
	<link rel="stylesheet" href="styles.css">
 
	<!-- Google fonts -->
	<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=Prompt:ital,wght@0,300;0,400;0,500;0,800;1,300;1,400;1,500;1,800&display=swap" rel="stylesheet">
 
	<!-- Bootstrap -->
	<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
	<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script>
 
	<!-- Popper -->
	<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script>
 
</head>
<body>
 
	<!-- Barra de navegación -->
	<nav class="navbar navbar-expand-lg">
	    <div class="container-fluid">
	        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
	      		<span class="navbar-toggler-icon"></span>
	    	</button>
	    	<div class="collapse navbar-collapse justify-content-center" id="navbarNavDropdown">
	      		<ul class="navbar-nav">
	        		<li class="nav-item">
	          			<a class="nav-link active" aria-current="page" href="index.html">Dekiru</a>
	        		</li>
	        		<li class="nav-item">
	        		<li class="nav-item dropdown">
	          			<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Carta</a>
	          			<ul class="dropdown-menu">
	            			<li><a class="dropdown-item" href="cartaRestaurante.html">Restaurante</a></li>
	            			<li><a class="dropdown-item" href="cartaTakeaway.html">Take away</a></li>
	          			</ul>
	        		</li>
	          			<a class="nav-link" href="top.html">Lo más TOP</a>
	        		</li>
	        		<li class="nav-item">
	          			<a class="nav-link" href="compania.html">En compañía</a>
	        		</li>
	        		<li class="nav-item">
	          			<a class="nav-link" href="reservas.html">Reservas</a>
	        		</li>
	      		</ul>
	    	</div>
	  	</div>
	</nav>
 
	<!-- Header -->
		<header>
			<div class="container-fluid">
				<div class="row">
					<!-- Esquina izquierda -->
					<div class="col-12 col-lg-4">
						<div class="container">
							<img src="img/esquina.png" class="imgHeader" alt="Adorno japonés">
						</div>
					</div>
					<!-- Logo -->
					<div class="col-12 col-lg-4">
						<div class="container">
							<img src="img/dekiru_header400.png" class="imgHeader" alt="Logotipo Dekiru">
						</div>
					</div>
					<!-- Esquina derecha -->
					<div class="col-12 col-lg-4">
						<div id="esquina2" class="container">
							<img src="img/esquina.png" class="imgHeader" alt="Adorno japonés">
						</div>
					</div>
				</div>
			</div>
		</header>
 
	<!-- Título -->
	<div class="container">
		<div class="col-12 text-center shadow p-3 mb-5 rounded">
			<h1>Reservas</h1>
		</div>
	</div>
 
	<section class="container-reservas">
		<h5>Haz tu reserva online</h5>
		<br>
		<p>Pincha en el botón y rellena con los datos de la reserva.</p>
		<p>Te mandaremos un mail de confirmación cuando la reserva esté realizada.</p>
	</section>
 
	<!-- Formulario reservas -->
 
	<!-- Button trigger modal -->
 
	<div class="container-modal">
		<button type="button" class="btn-form btn-lg" data-bs-toggle="modal" data-bs-target="#exampleModal">
		  Reserva tu mesa
		</button>
	</div>
 
	<!-- Modal -->
	<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
	  <div class="modal-dialog modal-dialog-centered">
	    <div class="modal-content">
	      <div class="modal-header">
	        <h5 class="modal-title" id="exampleModalLabel">Formulario de reservas</h5>
	        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
	      </div>
	      <div class="modal-body">
	        <form action="">
	        	<input type="text">Formulario
 
	        </form>
	      </div>
	      <div class="modal-footer">
	        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cerrar</button>
	        <button type="button" class="btn btn-primary">Enviar</button>
	      </div>
	    </div>
	  </div>
	</div>
 
	<!-- Mapa Google Maps -->
 
	<section class="container-reservas">
		<p>Aquí tienes el mapa de dónde nos encontramos</p>
	</section>
 
	<div class="container" id="mapa">
		<div class="col-12">
			<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d745.1771871217087!2d-0.9049695999999997!3d41.66203439999999!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0xd5914b4a45a2b81%3A0x7de0f67a84ad4b20!2sAv.%20de%20Pablo%20Gargallo%2C%20109%2C%2050003%20Zaragoza!5e0!3m2!1ses!2ses!4v1664553281433!5m2!1ses!2ses" width="500" height="400" style="border: 2px solid black;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
		</div>
	</div>
 
	<!-- Footer -->
	<footer class="container">
		<div class="d-flex justify-content-center" id="contacta">
			<h6>Contacta con nosotres a través de:</h6>
		</div>
		<div class="d-flex justify-content-center" id="redesfooter">
			<a href="https://www.facebook.com" class="enlaceRRSS" target="_blank">
				<img src="img/facebook.png" alt="Logo Facebook" class="logosRRSS">
			</a>
			<a href="https://www.instagram.com" class="enlaceRRSS" target="_blank">
				<img src="img/instagram.png" alt="Logo Instagram" class="logosRRSS">
			</a>
			<a href="https://twitter.com/home?lang=es" class="enlaceRRSS" target="_blank">
				<img src="img/twitter.png" alt="Logo Twitter" class="logosRRSS">
			</a>
		</div>
		<div class="container-fluid" id="datosFooter">
			<div class="d-flex justify-content-center">
				<p>Nos encontramos en Avd. Libertad nº 3, Huesca</p>
			</div>
			<div class="d-flex justify-content-center">
				<p>Dekiru cocina de vanguardia japonesa, 2022</p>
			</div>
		</div>
		<div class="d-flex justify-content-center">
			<img src="img/dekiru_footer250.png" alt="Logotipo Dekiru" class="logoFooter">
		</div>
	</footer>
 
</body>
</html>

Y adjunto mi hoja de estilos entera por si acaso:

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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
/* Body */
 
	body {
		font-family: 'Prompt', sans-serif;
		width: 100%;
		height: 100%;
		background-image: linear-gradient(#ffffff 25%, #901418, #000000);
	}
 
/* Barra de navegación */
 
	.navbar a {
 
		margin-top: 5px;
		font-size: x-large;
		background-color: #ffffff;
		color: #901418;
		margin-top: 2vh;
		margin-bottom: 2vh;
		font-family: 'Prompt', sans-serif;
	}
 
	.nav-link {
		margin-left: 5vh;
		margin-right: 5vh;
 
	}
 
/* Título */
 
	h1 {
 
		font-family: 'Prompt', sans-serif;
	}
 
/* Header */
 
	header {
 
		margin-bottom: 10vh;
	}
 
	.imgHeader {
 
		width: 40vh;
		max-width: 100%;
		height: auto;
		margin:auto;
		display:block;
	}
 
	.imgHeader:hover {
		transform: rotate3d(0, 0, 1, 360deg);
		transition: 1.5s ease-in-out;
	}
 
 
	#esquina2 {
		transform: scaleX(-1);
	}
 
/* Texto presentación */
 
	#presentacion{
 
		margin:auto;
		display:block;
		width: 500px;
		height: 300px;
		text-align: center;
		font-family: 'Prompt', sans-serif;
		color: black;
		font-size: large;
		font-weight: 500;
	}
 
	.maravillas {
		font-family: 'Prompt', sans-serif;
		color: #000;
		font-size: large;
		font-weight: 500;
	}
 
/* Cards index.html */
 
	h5 {
		font-family: 'Prompt', sans-serif;
		color: #000;
		font-size: medium;
	}
 
	.card {
 
		width: 75%;
		height: auto;
		margin-left: 8vh;
 
	}
 
	.card-body {
 
		width: auto;
		height: auto;
		display:block;
		font-family: 'Prompt', sans-serif;
 
	}
 
	.card-title {
 
		color: #fff;
		margin-bottom: 20px;
		font-family: 'Prompt', sans-serif;
	}
 
	.card-text {
 
		color: #fff;
		margin-bottom: 20px;
		font-family: 'Prompt', sans-serif;
	}
 
	div .card {
 
		background-color: #000;
		margin-bottom: 2vh;
	}
 
	.card-img-top:hover {
 
		transform: scale(1.3);
	}
 
/* Carta cartaRestaurante.html */
 
	h2 {
		text-shadow: 0.1em 0.1em 0.2em #fff;
	}
 
	h4 {
		color: #f02d30;
		text-shadow: -1px 0 black, 0 1px #fff, 1px 0 black, 0 -1px #000;
	}
 
	a {
		text-decoration: none;
		font-family: 'Prompt', sans-serif;
	}
 
	.contenedorCarta {
		max-width: 1200px;
		margin: 0 auto;
	}
 
	.column-2.carta {
		opacity: 0.9;
		display: grid;
		grid-template-columns: repeat(2,1fr);
		column-gap: 1rem;
		row-gap:  1rem;
	}
 
	.plato-carta {
		display: flex;
		align-items: center;
		border: 2px solid #000;
		border-radius: 6px;
		background-color: #000;
		box-shadow: 21px 19px 17px 1px rgba(219,68,68,0.95);
 
	}
 
	.img-plato-carta img {
		max-width: 200px;
		max-height: 100px;
		display: flex;
		flex-basis: 25%;
		justify-content: center;
 
	}
 
	.img-plato-carta:hover {
		transform: scale(3.0);
	}
 
	.seccionCarta {
		font-family: 'Prompt', sans-serif;
		font-weight: 500;
		color: #000;
		margin-top: 25px;
		margin-bottom: 25px;
	}
 
 
	.nombre-plato-carta {
		font-family: 'Prompt', sans-serif;
		color: #fff;
		border: 1px solid #901418;
		border-left: none;
		border-bottom: none;
		border-top: none;
		flex-basis: 60%;
		padding: 0 1rem;
	}
 
	.precio-plato-carta {
		color: #fff;
		display: flex;
		flex-basis: 25%;
		justify-content: center;
		font-weight: bold;
	}
 
	@media (max-width: 680px) {
		.column-2.carta {
			grid-template-columns: repeat(1,1fr);
		}
	}
 
/* Carrusel */
 
.container-especialidades {
 
	text-align: center;
	font-family: 'Prompt', sans-serif;
	color: black;
	font-size: large;
	font-weight: 500;
 
}
 
#carrusel {
	margin-top: 100px;
	margin-bottom: 100px;
}
 
.imgCarrusel {
	width: 100%;
	height: 50%;
	justify-content: center;
	vertical-align: top;
}
 
#selectores {
	display: flex;
	justify-content: center;
	background-color: #000;
}
 
.selector {
	width: 13px;
	height: 13px;
	border-radius: 50%, 20px;
	background-color: #fff;
	margin: 8px 10px;
	cursor: pointer;
}
 
/* Reservas */
 
.container-reservas {
	text-align: center;
	font-family: 'Prompt', sans-serif;
	font-size: large;
	font-weight: 500;
	color: #000;
}
 
 
.btn-form {
	background-color: #fff;
	font-family: 'Prompt', sans-serif;
	font-weight: 500;
	font-size: x-large;
	border-radius: 30px;
	border-color: #901418;
	box-shadow: 0px 10px 10px black;
	width: 300px;
	height: 60px;
}
 
.container-modal {
 
	text-align: center;
	margin: 100px;
}
 
/* Mapa */
 
#mapa {
 
 
    overflow:hidden;
    padding-bottom:50%;
    position:relative;
    width: 800px;
    height: auto;
 
 
}
 
#mapa iframe {
 
    left:0;
    top:0;
    height:40%;
    width:100%;
    position:absolute;
 
}
 
/* Footer */
 
	footer {
		margin-top: 30px;
	}
 
	h6 {
		color: #fff;
		font-family: 'Prompt', sans-serif;
	}
 
	#enlaceEspecialidades {
 
		font-family: 'Prompt', sans-serif;
		text-decoration: none;
		color: white;
		margin-top: 3vh;
		margin-bottom: 5vh;
 
	}
 
	#enlaceEspecialidades:active {
	  font-family: 'Prompt', sans-serif;
	  text-decoration: none
	 }
 
	#enlaceEspecialidades:hover {
	  font-family: 'Prompt', sans-serif;
	  color: #901418;
	  background-color: #fff;
	}
 
 
/* Logos RRSS */
 
	.logosRRSS {
 
		width: 50px;
		height: 50px;
	}
 
	#datosFooter {
 
		font-family: 'Prompt', sans-serif;
		color: white;
	}
 
	#contacta {
 
		margin-bottom: 10px;
		margin-top: 10px;
		margin-left: 10px;
		margin-right: 10px;
	}
 
	.logosRRSS {
		margin-bottom: 10px;
		margin-top: 10px;
	}
 
	.logosRRSS:hover {
		transform: scale(1.5);
	}
 
	.enlaceRRSS {
 
		text-decoration: none;
		color: #fff;
		margin-bottom: 10px;
		margin-top: 10px;
		margin-right: 10px;
		margin-left: 5px;
	}
 
	.enlaceRRSS:active {
 
	  text-decoration: none
	 }
 
	.enlaceRRSS:hover {
 
	  color: #901418;
	  text-decoration: none;
 
	}
 
	.logoFooter {
 
		width: 70px;
		height: auto;
		margin-bottom: 2vw;
		margin-top: 2vw;
	}
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