CSS - problema con input

 
Vista:
sin imagen de perfil

problema con input

Publicado por jose (2 intervenciones) el 04/04/2022 04:10:56
hola buenas tengo un problema y es que ando intentando colocar 2 input en el header (de busqueda) pero a la hora que minimizo la pagina a menor resolucion el input tiende a perderse y salirse de la pagina, y la pagina extenderse mas aca les dejo el codigo por si me pueden ayudar :(

PD: SOY NUEVO PROGRAMANDO Y QUIERO APRENDER LO MAYOR POSIBLE


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
HTML:       div class="header-top">
			<a href="https://animeflizon.000webhostapp.com"><img src="https://animeflizon.000webhostapp.com/imagen/logo.png" class="header-top__img"></a>
			<input type="text" name="" placeholder="Buscar" class="header-top__input">
			<input type="submit" name="" value="Enviar" class="header-top__input">
		</div>
 
 
CSS:
 
.header-top {
	position: relative;
}
.header-top__img {
	position: relative;
	height: 130px;
	width: 200px;
	margin: 4px;
	box-shadow: 9px 9px 9px #000, 9px 9px 9px #000, 9px 9px 9px #000;
}
.header-top__input {
	transform: translate(48em,-3.5em);
	outline: 0;
	box-shadow: 2px 2px 3px orange;
	border: none;
	border: 0px;
	padding: 3px;
}
input {
 
	box-sizing: border-box;
}
.header-top__input:nth-child(2){
		border-radius: 5px;
}
.header-top__input:nth-child(2):hover{
		background: linear-gradient(#fff,#49494a 95%);
		border: 1px solid orange;
}
.header-top__input:nth-child(3):hover {
	cursor: pointer;
	background: linear-gradient(#fff,#49494a 95%);
	border: 1px solid orange;
}
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
sin imagen de perfil

problema con input

Publicado por antonio (8 intervenciones) el 04/04/2022 15:56:39
El problema esta en el header_top_input el translate lo deja siempre en el mismo sitio hay varias soluciones o hacer un @media con el tamaño deseado o le cambias el formato al css:
@media (max-width: 600px) {
.header-top__input {
float: right;
margin-top:100px;
outline: 0;
box-shadow: 2px 2px 3px orange;
border: none;
border: 0px;
padding: 3px;
}
}
@media (min-width: 600px) {
.header-top__input {
transform: translate(48em,-3.5em);
outline: 0;
box-shadow: 2px 2px 3px orange;
border: none;
border: 0px;
padding: 3px;
}
}
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

problema con input

Publicado por jose (2 intervenciones) el 04/04/2022 19:53:47
muchas gracias me funciono
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