PHP - height: auto; no va en div

 
Vista:

height: auto; no va en div

Publicado por nacho (14 intervenciones) el 30/07/2014 16:07:56
tengo un menu acordeon con alturas diferentes y pongo:


#acordeon .item:hover{
height:auto;
}

Pero si pongo 200px; funciona. pero solo a esa altura.
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 Salvador

height: auto; no va en div

Publicado por Salvador (125 intervenciones) el 30/07/2014 17:47:29
Podrias describir un poquito mas cual es el problema,,
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

height: auto; no va en div

Publicado por nacho (14 intervenciones) el 01/08/2014 18:08:19
No os preocupeis, el problema esta solucionado, ya.
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 xve
Val: 3.943
Oro
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

height: auto; no va en div

Publicado por xve (6935 intervenciones) el 02/08/2014 10:25:57
Hola Nacho, cual era el problema? nos lo puedes compartir?
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

height: auto; no va en div

Publicado por nacho (14 intervenciones) el 08/09/2014 19:56:09
este es el codigo, el acordeon sale muy rapido, me han recomendado que utilice max-height, pero no me lo despliega.


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
<style>
#acordeon {
	width: 230px;
	margin:5px auto auto auto;
    align: Left;
}
 
#acordeon .item {
	width: 230px;
	overflow: hidden;
	color: #000000;
	height:15px;
	font-size:11px;
	font-family: helvetica;
	cursor: pointer;
	margin-bottom: 3px;
	text-align: center;
	vertical-align: middle;
	}
 
#acordeon .polo a {
	text-decoration:none; font-family: helvetica;
	font-size: 10px;
	text-aling: center;
	color:#ffffff;
	background: #87e0fd; /* Old browsers */
	background: -moz-linear-gradient(top,  #87e0fd 0%, #53cbf1 40%, #05abe0 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#87e0fd), color-stop(40%,#53cbf1), color-stop(100%,#05abe0)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* IE10+ */
	background: linear-gradient(to bottom,  #87e0fd 0%,#53cbf1 40%,#05abe0 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#87e0fd', endColorstr='#05abe0',GradientType=0 ); /* IE6-9 */
 
	font-size:10px;
	cursor: pointer;
}
 
#acordeon .item a {
	text-decoration: none;
	border-radius: 10px;
	color:#000000;
	display: block;
	width:230px;
	height: 15px;
	vertical-align: middle;
	background: #99b6dd; /* Old browsers */
	background: -moz-linear-gradient(top,  #99b6dd 1%, #eff7fc 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#99b6dd), color-stop(100%,#eff7fc)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  #99b6dd 1%,#eff7fc 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  #99b6dd 1%,#eff7fc 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  #99b6dd 1%,#eff7fc 100%); /* IE10+ */
	background: linear-gradient(to bottom,  #99b6dd 1%,#eff7fc 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#99b6dd', endColorstr='#eff7fc',GradientType=0 ); /* IE6-9 */
	margin-bottom:5px;
		-webkit-transition: all .3s ease;
	-moz-transition: all .3s ease;
	-o-transition: all .3s ease;
	-ms-transition: all .3s ease;
	transition: all .3s ease;
 
}
 .clearing{
      clear:both;
   }
 
 
------------------ES AQUI------------------------------------------
[#acordeon .item:hover{
 
    height:auto;
}
-------------------------------------------------------------------------
 
 
</style>
 
<?php
$Categoria1 = str_replace("-", " ",$_GET['Categoria1']);
$Categoria2 = str_replace("-", " ",$_GET['Categoria2']);
 
function left($string, $count){
   return substr($string, 0, $count);
 }
 
echo "<div id='acordeon'><div id='acordeon'>";
$Lis=mysql_query("SELECT Categoria1,Categoria2 from articulos group by Categoria1,Categoria2");
 
 
while($pro = mysql_fetch_array($Lis)) {
	if ($ulti==$pro['Categoria1'])
		{
			$z=$z+1;
 
			echo "<p style='height:17px; margin:0;'><a onmouseover='javascript: esperar(1)' style='text-decoration: none; border-radius: 10px; color:#000000; display: block; width:220px; height: 15px;	vertical-align: middle; background: #c1e9f5;' href='http://opix.es/tienda/".$pro['Categoria1']."/".$pro['Categoria2']."?a='>".left($pro['Categoria2'],30)."</a></p>";
		}
	else
		{
			$pus = 15*$z;
			$x = $x+1;
 
			echo "</div><div id'clearing'></div><div id='".$pus."' class='item'><a onmouseover='javascript: esperar(1)' href='http://opix.es/tienda/".$pro['Categoria1']."?a='>".$pro['Categoria1']."</a>";
		}
	$ulti=$pro['Categoria1'];
}
?>
 
<script type="text/javascript">
 
function esperar(espera)
{
	setSeconds(2);
	setTimeout("",espera);
 
}
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