Ver Mensaje Individual
  #10 (permalink)  
Antiguo 18/03/2009, 12:18
MeneXe
 
Fecha de Ingreso: julio-2008
Mensajes: 162
Antigüedad: 15 años, 8 meses
Puntos: 0
De acuerdo Respuesta: Nuevo problema en "Al sañalar Link Cambia Fondo" ayuda nuevamente :P

Cita:
Iniciado por Mikmoro Ver Mensaje
Bueno, por aportar algo, el asunto es así de sencillo:
si a un enlace le damos display block podremos darle medidas mediante width y height. Esto hará que todos los enlaces (de esa sección) tengan las mismas medidas.
Si queremos que un enace ocupe tanto como su contenido, no le damos display block sino dejamos el que tiene por defecto, que es inline, de esa manera crece en una línea tanto como su conteneido sin provocar salto. Si en este caso queremos que ocupe en cualqueira de sus 4 lados más que sólo el texto, lo hacemos mediante padding.

Si pudiera ver tu código podría decirte qué te conviene. No uso rar.

Como el problema se da en la imagen de fondo es necesario que veas la imagen para entender el problema. Son links con imagenes de fondo en sus divs, a su vez las imagenes de fondo son diferentes para cada link, y cada anchor text es diferente en su tamaño.

Asi que te subi el archivo en ZIP, el zip viene con windows xp.

http://rapidshare.com/files/21078569...elweb.zip.html


Igualmente pego el codigo

Código:
<!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="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin titulo</title>
<style type="text/css">
<!--
#apDiv1 {
	position:absolute;
	left:104px;
	top:62px;
	width:800px;
	height:481px;
	z-index:1;
	background-image: url(sub%20fondo%20bg.jpg);
}
#apDiv2 {
	position:absolute;
	left:213px;
	top:467px;
	width:122px;
	height:59px;
	text-align:center;
	line-height:45px;
	z-index:2;
}

a {
	display: block;
	width: 122px;
	margin: 0px;
	padding: 5px 0px 0px;
	height: 59px;
	color: #000000;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: #0a7c7d;
	font-weight: bold;
	font-size: 14px;
}



.linkuno { no-repeat; }
a:hover.linkuno {background:url(productos%20bg.jpg) no-repeat; }

.linkdos { no-repeat; }
a:hover.linkdos {background:url(Consultas.jpg) no-repeat; }

.linktres { no-repeat; }
a:hover.linktres {background:url(Preguntas%20Frecuentes%20bg.jpg) no-repeat; }


a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
#apDiv3 {
	position:absolute;
	left:342px;
	top:469px;
	width:118px;
	height:62px;
	text-align:center;
	line-height:45px;
	z-index:3;
}
#apDiv4 {
	position:absolute;
	left:335px;
	top:465px;
	width:121px;
	height:60px;
	text-align:center;
	line-height:51px;
	z-index:3;
}
#apDiv5 {
	position:absolute;
	left:462px;
	top:467px;
	width:202px;
	height:57px;
	z-index:4;
	text-align:center;
	line-height:51px;
}


-->
</style>
</head>

<body>
<div id="apDiv1"></div>
<div id="apDiv2"><a href="http://www.google.com.ar" class="linkuno">Productos</a></div>
<div id="apDiv4"><a href="http://www.google.com.ar" class="linkdos">Consultas</a></div>
<div id="apDiv5"><a href="http://www.google.com.ar" class="linktres">Preguntas_Frecuentes</a></div>
</body>
</html>