HTML - Como elimino espacio de sobra html

 
Vista:
sin imagen de perfil

Como elimino espacio de sobra html

Publicado por Kleber (3 intervenciones) el 17/01/2018 01:09:53
Hola necesito ayuda en mi codigo html, pues hace un rato puse una barra estatica en el codigo
cosa que funciono bien y hasta ahí, pero lo que se me dificulta es eliminar un espacio
de sobra que no se que manera eliminar, ya vi el codigo y el css pero no doy con el resultado,

la barra estatica al ecortar su tamaño no ayuda en nada, sigue el espacio de sobra, podrian ayudarme?
cualquier consejo para probar me serviria de mucho. gracias



jelp
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
Imágen de perfil de Lopez
Val: 886
Plata
Ha mantenido su posición en HTML (en relación al último mes)
Gráfica de HTML

Como elimino espacio de sobra html

Publicado por Lopez (271 intervenciones) el 17/01/2018 01:37:36
Hola Kleber,

Bienvenido a LWP,
la verdad sin saber del código fuente que usas, es difícil definir que puede ir mal,
no obstante tal vez pueden ser tema de CSS, margenes y relleno, como lo resolvimos en este tema:
https://www.lawebdelprogramador.com/foros/HTML/1638156-Evitar-que-la-pagina-haga-scroll.html

En tu CSS añade esto:

1
2
3
4
5
6
7
body,html {
  padding:0;
  margin:0;
  height:100%;
/* Podrías añadir también aquí:
overflow:hidden; */
}

Cuéntanos que tal te fue,
Saludos!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Como elimino espacio de sobra html

Publicado por Kleber (3 intervenciones) el 17/01/2018 02:10:50
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
<html>
		<head>
				<title>Hello World</title>
				<link href="hello!.css" rel="stylesheet">
 
<style type="text/css">
  body{
  margin: 10px 5px 15px 20px;
  padding:100px 0 0 0;
}
div#header{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:55px;
  background-color:#38271c;
  color:#000000;
}
 @media screen{
  body>div#header{
   position: fixed;
  }
 }
 * html body{
  overflow:hidden;
 }
 * html div#content{
  left:300px;
  height:100px;
  overflow:auto;
 }
</style>
 
		</head>
 
	<body>
	<!-- La cabeza es estatica y contiene los botones-->
	<div id="header">
	<img src="images/logo.png" style="position:absolute;left:5px;top:px;z-index:0">
	<input type="submit" id="Button1" onclick="window.location.href='';return false;" name="" value="Inicio" style="position:absolute;left:520px;top:5px;width:136px;height:45px;z-index:0;">
	<input type="submit" id="Button1" onclick="window.location.href='';return false;" name="" value="Tutoriales" style="position:absolute;left:670px;top:5px;width:136px;height:45px;z-index:0;">
	<input type="submit" id="Button1" onclick="window.location.href='';return false;" name="" value="Descargas" style="position:absolute;left:820px;top:5px;width:136px;height:45px;z-index:0;">
 
	</div>
	<input type="submit" id="publicidad1" onclick="window.location.href='';return false;" name="" value="" style="position:absolute;left:1260px;top:155px;width:300px;height:145px;z-index:0;">
	<input type="submit" id="publicidad2" onclick="window.location.href='';return false;" name="" value="" style="position:absolute;left:1260px;top:355px;width:300px;height:145px;z-index:0;">
	<input type="submit" id="publicidad3" onclick="window.location.href='';return false;" name="" value="" style="position:absolute;left:1260px;top:555px;width:300px;height:145px;z-index:0;">
	<div id="content">
 
	</div>
 
 
 
 
	</body>
 
 
</html>

el de arriba es el html
y el css es este

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
body,html {
 
   background-image: url(images/background.png);
   background-repeat: repeat-n;
   color: #000000;
   font-family: Times New Roman;
   font-weight: normal;
   font-size: 13px;
   line-height: 1.1875;
   margin: 0;
   padding: 0;
   height:100%;
 
}
#Button1
{
   border: 2px #000000 solid;
   border-radius: 0px;
   background-color: #321712;
   background-image: none;
   color:  blue;
   font-family: Times Roman;
   font-weight: normal;
   font-size: 13px;
}
#publicidad1
{
   border: 2px #000000 solid;
   border-radius: 0px;
   background-color: none;
   background-image: url(images/publicidad1.png);
   color:  blue;
   font-family: Times Roman;
   font-weight: normal;
   font-size: 13px;
}
#publicidad2
{
   border: 2px #000000 solid;
   border-radius: 0px;
   background-color: none;
   background-image: url(images/publicidad2.png);
   color:  blue;
   font-family: Times Roman;
   font-weight: normal;
   font-size: 13px;
}
#publicidad3
{
   border: 2px #000000 solid;
   border-radius: 0px;
   background-color: none;
   background-image: url(images/publicidad3.png);
   color:  blue;
   font-family: Times Roman;
   font-weight: normal;
   font-size: 13px;
}

Hay manera de que me puedan ayudar? 7n7
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de Lopez
Val: 886
Plata
Ha mantenido su posición en HTML (en relación al último mes)
Gráfica de HTML

Como elimino espacio de sobra html

Publicado por Lopez (271 intervenciones) el 17/01/2018 04:19:24
Claro, la primera ayuda que puedo darte es que aprendas un poquito mas de HTML y CSS.
https://www.w3schools.com/ Es un buen lugar para empezar.

Yendo por partes en tu html tienes doble declaración para body, html.
Remueve:

1
2
3
4
body{
  margin: 10px 5px 15px 20px;
  padding:100px 0 0 0;
}

#publicidad1, #publicidad2 y #publicidad3 tienen en su style:
1
position:absolute; left:1260px;

Remuevelo de los 3, la idea es que quede al menos algo así:
1
<input type="submit" id="publicidad1" onclick="window.location.href='';return false;" name="" value="" style="width:300px;height:145px;z-index:0;">

Si te leo el código, dice que tiene que el elemento debe estar ubicado, partiendo de la izquierda, 1260px a la derecha, si la resolucion de pantalla es menor, obvio saldrá un "sobrante" en forma de scrollbar.

Con eso debería estar resuelto,
Saludos!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar
sin imagen de perfil

Como elimino espacio de sobra html

Publicado por Kleber (3 intervenciones) el 17/01/2018 04:23:36
Hola, lastimosamente este error solo lo soluciono con el sum, al 76% solo asi, creo que me conformare y no le dare mas vueltas

¡Gracias hermano!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
-1
Comentar