hack ie

Loix

Power Member
boas pessoal,

não consigo por um script de javascript a funcionar correctamente no ie, ja experimentei usar o * e _ mas nada,perde qualidade e fica fora da posição que eu delimitei,alguem sabe do que se trata?

need help

Abraço
 
Eu tenho um script em javascript numa pagina html,simplesmente o script no ie aparece com uma qualidade baixa e descentra do sitio que eu posicionei na css comparado km o que aparece no firefox.

Eu tive a investigar e disseram-me para usar o asterisco e|ou underscore na propriedade da css que eu desejar de forma a que so o ie o detecte e tenha as suas proprias propriedades,ja experimentei esse hack mas não funciona.Sera da Css?ou do script?
 
Eu tenho um script em javascript numa pagina html,simplesmente o script no ie aparece com uma qualidade baixa e descentra do sitio que eu posicionei na css comparado km o que aparece no firefox.

Eu tive a investigar e disseram-me para usar o asterisco e|ou underscore na propriedade da css que eu desejar de forma a que so o ie o detecte e tenha as suas proprias propriedades,ja experimentei esse hack mas não funciona.Sera da Css?ou do script?

Sem pores o script e o css podemos tentar adivinhar!!! Mas não me parece ser a melhor solução.
 
boas pessoal,

não consigo por um script de javascript a funcionar correctamente no ie, ja experimentei usar o * e _ mas nada,perde qualidade e fica fora da posição que eu delimitei,alguem sabe do que se trata?

need help

Abraço

Deves estar a referir hacks css, por ex. se fôr ie6 podes usar _width:48em; se for ie7 podes colocar *width:48em;

Mas é aconselhável usares antes conditional comments, por ex.

Código:
<!--[if lt IE 7]>
  <link rel="stylesheet" type="text/css" href="style_ie6.css" media="all" />
<![endif]-->

ou

Código:
<!--[if IE 7]>
  <link rel="stylesheet" type="text/css" href="style_ie7.css" media="all" />
<![endif]-->

ou

Código:
<!--[if IE]>
  <link rel="stylesheet" type="text/css" href="style_ie.css" media="all" />
<![endif]-->

....


Neste link encontras mais informação
 
Sem pores o script e o css podemos tentar adivinhar!!! Mas não me parece ser a melhor solução.

Código:
[noparse]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>dock menu - Interactive DHTML art-demos</title>
<meta name="Author" content="Gerard Ferrandez at http://www.dhteumeuleu.com">
<meta http-equiv="imagetoolbar" content="no">
<style type="text/css">
html {
overflow: hidden;
}
body {
background: #fff;
width: 98%;
height: 100%;
}
#dock {
position: absolute;
bottom: 1em;
width: 100%;
text-align: center;
left: 0px;
}
#dock a:visited{
text-decoration: none;
}
#dock a{
text-decoration: none;
margin: -2px;
}
#dock img {
border: none;
width: 0px;
}
#legend {
position: absolute;
bottom: 0px;
width: 100%;
text-align: center;
font-family: arial;
font-weight: bold;
font-size: 1em;
color: #000;
}
</style>
 
<script type="text/javascript"><!--
// ================================================================
// ------ dock menu -------
// script by Gerard Ferrandez - Ge-1-doot - February 2006
// [URL]http://www.dhteumeuleu.com[/URL]
// ================================================================
 
var xm = xmb = ov = 0;
var M = true;
 
function dock(dock, sMin, sMax)
{
this.icons = document.getElementById(dock).getElementsByTagName('img');
this.N = this.icons.length;
this.s = sMin;
this.ovk = 0;
this.pxLeft = function(o)
{
for(var x=-document.documentElement.scrollLeft; o != null; o = o.offsetParent) x+=o.offsetLeft;
return x;
}
for(var i=0;i<this.N;i++)
{
with(this.icons[i])
{
style.width = sMin+"px";
style.height = sMin+"px";
className = "dockicon";
}
}
this.run = function()
{
with(this)
{
for(var i=0;i<N;i++)
{
var o = icons[i];
var W = parseInt(o.style.width);
if(ov && ov.className=="dockicon")
{
if(ov!=ovk)
{
ovk=ov;
document.getElementById("legend").innerHTML = ov.lang;
}
if(M) W = Math.max((s*Math.cos(((pxLeft(o)+W/2)-xm)/sMax)),sMin);
s = Math.min(sMax,s+1);
}
else
{
s = Math.max(s-1,sMin);
W = Math.max(W-N,sMin);
}
o.style.width = W+"px";
o.style.height = W+"px";
}
if(s >= sMax) M = false;
}
}
}
document.onmousemove = function(e)
{
if(window.event) e=window.event;
xm = (e.x || e.clientX);
if(xm!=xmb){
M = true;
xmb = xm;
}
ov = (e.target)?e.target:((e.srcElement)?e.srcElement:null);
}
window.onload = function()
{
dock = new dock("dock", 48, 128);
setInterval("dock.run()", 16);
}
//-->
</script>
</head>
 
<body>
 
<div id="dock">
<a href="http://www.dhteumeuleu.com/" target="_blank"><img src="Home.gif" lang="Home"></a>
<a href="http://www.kalifrogz.net/" target="_blank"><img src="My Computer.gif" lang="My Computer"></a>
<a href="http://www.marathon-medoc.com/marathon-fun-medoc-2.html" target="_blank"><img src="Books.gif" lang="Files"></a>
<a href="http://ecolejda.org/" target="_blank"><img src="Applications.gif" lang="Applications"></a>
<a href="http://www.kentdesign1.com/art/picture_gallery/gallery_experiments.html" target="_blank"><img src="Chat.gif" lang="Chat"></a>
<a href="http://www.armenweb.org/dhteumeuleu/5.htm" target="_blank"><img src="Sound App.gif" lang="Sound"></a>
<a href="http://www.myartonair.com/2.htm" target="_blank"><img src="Printers.gif" lang="Printers"></a>
<a href="http://www.mafra.fot.br/" target="_blank"><img src="Trash Full.gif" lang="Trash"></a>
<a href="http://www.z-mation.com/grumpsopt.html" target="_blank"><img src="Help.gif" lang="Help"></a>
</div>
<div id="legend"></div>
 
</body>
</html>
[/noparse]
vejam o link

http://www.dhteumeuleu.com/run/s-dock/
 
Última edição pelo moderador:
Back
Topo