CSS - posicion lista desplegable

 
Vista:

posicion lista desplegable

Publicado por Javier (2 intervenciones) el 05/12/2011 17:12:25
Saludos tengo una lista deplegable, pero me sale mas abajo de lo normal solo en IE8 y necesito cuadrarla, soy novato en programacion, aqui les dejo mi codigo.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PAGINA_PRINCIPAL </title>
<link rel="shortcut icon" href="favicon.ico" >
 
<style type="text/css">
 
   body {overflow-x:auto; overflow-y:auto;}
 
</style>
 
<style type = "text/css">
 
.back{
background-image:url('');
background-repeat:no-repeat;
background-color:#99cccc;}	
<!--estas 3 lineas  de codigo es para que se vea cuadrada la lista desplegable en IE7-->
*{ margin:0; padding:0}
 #menu > li{ position:relative;}
 #menu > li > ul{ left:0;}
 
#menu{padding-left:0px; margin-top:120px;	}
#menu li{list-style:none; float:left;}
#menu li a{display:block; width:100px;height:20px; background-color:#FF0000;border:1px solid; padding:2px;text-decoration:none;
text-align:center; color:#000;font-family:arial; font-size:15px;font-weight:bold;}
#menu li a:hover{background:navy;border-color:transparent;color:#FF1493;}
#menu li ul{display:none; position:absolute;}
#menu li ul li {display:block;float:none; position:relative; padding:0px}
#menu li:hover ul{display:block; padding-left:0px;}
 
#contenedorr3 {
	border-radius:6px;
	-moz-border-radius:6px; /* Firefox */
	-webkit-border-radius:6px; /* Safari y Chrome */
	/* Otros estilos */
border:1px solid #333;
	width:92%;
	border: 1px solid #FF00FF;
	background-color: #36F;
	top: 147px;
	height: 50px;
	padding: 14.4px;
	float: none;
	clear: none;
	position: static;
	left: 11px;
	text-align: left;
	font-size: 16px;
	font-family: "Arial Black", Gadget, sans-serif;
	background-position: left;
}
 
body {
	margin-left: 12px;
	margin-top: 80px;
}
 body,td,th {
	font-size: 18px;
	color: #C09;
}
 .LO {font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif}
 .hfhfghfghf {
	color: #6F0;
	font-family: "Arial Black", Gadget, sans-serif;
}
 </style>
 
 <script>
function maximo(campo,limite){
if(campo.value.length>=limite){
campo.value=campo.value.substring(0,limite);
 }
}
</script>
 
</head>
 
<body bgcolor="#000080" topmargin="100">
 
<SPAN style="position: absolute; top: 12px; left: 20px; width: 120px; height: 49px"><img src="lovemoon.png" width="228" height="50" />
</SPAN>
 
<SPAN STYLE="position:absolute; top:65px; left:22px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; width: 242px; color: #FF00FF; font-size: 12px; font-style: italic;" >Si Amas algo d&eacute;jalo libre, si regresa es porque es tuyo, sino...nunca lo fue.
 
</SPAN>
 
<SPAN style="position: absolute; top: 16px; left: 279px; width: 539px; height: 95px"><img src="luna romantica.jpg" width="700" height="91"  /></SPAN>
 
 
<ul id="menu">
 
<li><a class="back" href="menus.php">Inicio</a></li>
<li><a class="back" href="mensajes.html">Mensajes</a></li>
<li><a class="back" href="enlinea.html"> En Linea</a></li>
<li><a class="back" href="busqueda.html">Busqueda</a></li>
<li><a class="back" href="coincidencias.html">Coincidencias</a></li>
<li><a class="back" href="visitantes.html">Visitantes</a></li>
<li><a class="back" href="menus.php">Mi Perfil</a>
<ul>
<li><a href="editarperfil.php">Editar Perfil</a></li>
<li><a href="fotos.php">Subir Fotos</a></li>
</ul></li>
<li><a class="back" href="chat.html"> CHAT</a></li>
<li><a class="back" href="cuenta_gold.php">Cuenta Gold</a></li>
 
 
<SPAN style="position: absolute; top: 622px; left: 29px; width: 212px; height: 35px">
encuentranos en: <img src="facebook.gif" width="25" height="24" /><img src="twitter.jpeg" width="25" height="24" />
<img src="youtube.jpeg" width="25" height="24" />
</SPAN>
 
<SPAN style="position: absolute; top: -150px; left: 279px; width: 539px; height: 95px"><img src="luna romantica.jpg" width="700" height="91"  /></SPAN>
 
<SPAN STYLE="position:absolute; top:22px; left:723px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; width: 62px; color: #FFF;" >
 
  Hola
 
  <?php
	echo   $_COOKIE['usuario1'];
	?>
 
 
</SPAN>
 
 
<div id="contenedorr3">
<p>La Membresia de Lovemoon es gratuita, pero la Membresia GOLD te ofrece mucho m&aacute;s:</p></div>
 
<p><SPAN style="position: absolute; top: 152px; left: 810px; width: 129px; height:34px"><a href="cuenta_gold.php"><img src="act_ahora.jpg" width="127" height="32" /></a>
  </SPAN>
 
<DIV STYLE="position:absolute; top:210px; left:10px; width:385px; background-color:midnightblue; height:30px; border:1px solid #333;-webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px; "</DIV>
 
  <SPAN STYLE="position:absolute; top:13px; left:19px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; width: 297px; color: white; font-size: 12px; font-style: italic;" >
 
 
  VER MENSAJES ()
 
</SPAN>
 
<DIV STYLE="position:absolute; top:30px; left:1px; width:385px; background-color:#36F; height:100px;"</DIV>
 
  <DIV STYLE="position:absolute; top:110px; left:0px; width:385px; background-color:midnightblue; height:30px; border:1px solid #333; -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px;"</DIV>
 
  <SPAN STYLE="position:absolute; top:13px; left:19px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; width: 297px; color: white; font-size: 12px; font-style: italic;" >
 
 
  FAVORITOS ()
 
</SPAN>
 
  <DIV STYLE="position:absolute; top:30px; left:1px; width:385px; background-color:#36F; height:100px;"</DIV>
 
 
  <DIV STYLE="position:absolute; top:-175px; left:420px; width:470px; background-color:midnightblue; height:30px; border:1px solid #333;-webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px; "</DIV>
 
  <SPAN class="formatocolor1" STYLE="position:absolute; top:8px; left:10px; font-family: Georgia, 'Times New Roman', Times, serif; width: 287px; font-size: 14px; font-style: italic; color: #99ff77;" >
 
<a href="recuperar.php" class="hfhfghfghf">BLOG DE LOVEMOON </a></SPAN>
 
 
<textarea name="text" style="position:absolute; top:35px; left:3px; background-color:#dd00cc; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;"
cols="56" rows="6"  border:1px solid #333  wrap="hard" onMouseover="this.style.backgroundColor='#ffdd33';" onMouseout="this.style.backgroundColor='#dd00cc';"  onKeyDown="maximo(this,255);" onKeyUp="maximo(this,255);"  readonly=”yes”>hola </textarea>
 
 
 
  <DIV STYLE="position:absolute; top:170px; left:1px; width:476px; background-color:#36F; height:100px;"</DIV>
 
  <DIV STYLE="position:absolute; top:120px; left:-420px; width:900px; background-color:#36F; height:100px;"</DIV>
 
<SPAN style="position: absolute; top: 168px; left: 44px; width: 137px; height: 49px"></SPAN>
 
<SPAN STYLE="position:absolute; top:120px; left:920px; color: #FFF;" >
 
  <a href="salir.html"><img src="salir.png" alt="" width="36" height="20" /></a>
 
  </SPAN>
 
  <SPAN STYLE="position:absolute; top:120px; left:880px; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; width: 42px; color: #FF8C00;" >
 
    salir
 
  </SPAN>
 
</body>
</html>
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

posicion lista desplegable

Publicado por DerangedMX (39 intervenciones) el 05/12/2011 20:59:06
Javier,

revisando tu código te comento lo siguiente:

- manejas mucho position:absolute; y esto genera que los elementos queden fijos dentro de la maquetación, de hecho, es lo que encima los elementos.
- tienes demasiado css en línea, genera clases y aplícalas en elementos genéricos
- debes seccionar el diseño, de tal forma que el menu, el encabezado, contenido y footer tengan su propio segmento.

Intentaré hacer una maqueta de ejemplo en cuanto tenga la oportunidad.

Saludos.

que es ssl | certificado de seguridad | certificado digital
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

posicion lista desplegable

Publicado por Javier (2 intervenciones) el 05/12/2011 22:30:40
Gracias por responder y sus concejos, soy muy novato, los aplicare.
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