OVH Cloud OVH Cloud

visibility:visible et pourtant...

2 réponses
Avatar
Raphaël Wils
Bonsoir

En lisant ce fichier dans Internet Explorer 6, #texte1 ne s'affiche pas
et je ne comprend pas pourquoi, alors que #texte2 s'affiche :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/HTML; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<style type="text/css">
ul {list-style:none;}
li{
clear:both;
width:10em;
display:block;
}
a{
float:left;
width:100%;
margin:0;
border:1px solid green;
background:yellow;
}
#texte1, #texte2{
display:block;
position:absolute;
left:15em;
width:8em;
border:1px solid green;
background:yellow;
}
#texte1{visibility:visible;}
#texte2{visibility:hidden;}
</style>
</head>
<body
onload="document.getElementById('texte2').style.visibility='visible';">

<ul>

<li>
<a href="#">lien</a>
<span id="texte1">texte1</span>
</li>

<li>
<a href="#">lien</a>
<span id="texte2">texte2</span>
</li>

</ul>

</body>
</html>
--
Raphael wils
http://perso.club-internet.fr/raphael.wils
"It don't mean a thing, if it ain't got that swing !"

2 réponses

Avatar
Le Fou
Raphaël Wils a écrit
Bonsoir

En lisant ce fichier dans Internet Explorer 6, #texte1 ne s'affiche pas
et je ne comprend pas pourquoi, alors que #texte2 s'affiche :
(...)
a{
float:left;
width:100%;
margin:0;
border:1px solid green;
background:yellow;
}



Si tu enlèves "float:left;" dans a{...}, ça fonctionne.
C'est une piste ;-)

--
A'tchao

Le Fou
http://club.exocet.free.fr/ - http://www.ffessm-cd84.com/
http://perso.club-internet.fr/ehiller/
Avatar
thierry.loiseau
Le Fou wrote:

> a{
> float:left;
> width:100%;
> margin:0;
> border:1px solid green;
> background:yellow;
> }

Si tu enlèves "float:left;" dans a{...}, ça fonctionne.
C'est une piste ;-)



Je n'ai pas essayé, mais bon, bravo Eric ;-)
Tu comprends par ailleurs ce bug ?

@++,
Thierry
--
<http://astrophoto.free.fr> Calculatrice astronomique en
JavaScript, une carte du ciel avec la position des planètes,
animation du système solaire, et «ousqu'ilfait» jour & nuit ?