Faire des menus déroulants texte de couverture et de rester active onclick
- Jan Jeremy Go
- Newbie


- Inscription: Oct 20, 2010
- Messages: 13
- Loc: Philippines
- Status: Offline
Salut les gars, j'ai besoin d'aide!
Q1:
Savez-vous comment puis-je faire mes menus déroulants "id=submenu> <div« chevauchement / couvrir le texte sur "id=container> <div"? J'utilise "z-index:", mais aucun effet!
Q2:
Comment puis-je faire mon menu rester actif lorsque le cliquez, dans FireFox: "active" se produisent uniquement lorsque le clic, mais après retour à «flotter», contrairement à Internet Explorer, il va rester, mais de nombreux pas possible de faire comme "div: hover" . Peut-être que j'ai besoin d'utiliser "onclick" ou parfois? Mais je ne sais pas comment faire menu déroulant avec cela.
Q3 :
Comment puis-je la position de mon temps sur le côté droit, sans destruction, j'utilise "float: right" mais le format que je veux c'est une seule ligne, mais il crée 2 lignes. Y at-il «de gauche:" et "top"? droit?
S'il vous plaît aider, si vous répondez à mes questions, et heres mon code:
Hey n'oubliez pas de mettre DOCTYPE sur le dessus de vos codes!
<DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN"
"Http://www.. Org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
....... / / Www.w3. ou...
Merci d'avance pour aider / directeurs / me dire!
Q1:
Savez-vous comment puis-je faire mes menus déroulants "id=submenu> <div« chevauchement / couvrir le texte sur "id=container> <div"? J'utilise "z-index:", mais aucun effet!
Q2:
Comment puis-je faire mon menu rester actif lorsque le cliquez, dans FireFox: "active" se produisent uniquement lorsque le clic, mais après retour à «flotter», contrairement à Internet Explorer, il va rester, mais de nombreux pas possible de faire comme "div: hover" . Peut-être que j'ai besoin d'utiliser "onclick" ou parfois? Mais je ne sais pas comment faire menu déroulant avec cela.
Q3 :
Comment puis-je la position de mon temps sur le côté droit, sans destruction, j'utilise "float: right" mais le format que je veux c'est une seule ligne, mais il crée 2 lignes. Y at-il «de gauche:" et "top"? droit?
S'il vous plaît aider, si vous répondez à mes questions, et heres mon code:
Hey n'oubliez pas de mettre DOCTYPE sur le dessus de vos codes!
<DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN"
"Http://www.. Org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
....... / / Www.w3. ou...
HTML Code: [ Select ]
<html>
<head>
<title>My_Site</title>
</head>
<body onload="startTime()">
<div>
<div>
<div>
<a class="menu" title="Home" href="#Home">Home</a>
<div>
<a class="submenu" title="" href="#Home_Wall">Wall</a>
<a class="submenu" title="" href="#Home_Profile">
Profile</a>
<a class="submenu" title="" href="#Home_PM's">PM's</a>
<a class="submenu" title="" href="#Home_Security and
Privacy">Security and Privacy</a>
</div>
</div>
<div>
<a class="menu" title="Forum" href="#Forum">Forum</a>
<div>
<a class="submenu" title="" href="#Forum_Programs">Programs</a>
<a class="submenu" title="" href="#Forum_Friends">Friends</a>
<a class="submenu" title="" href="#Forum_Games">Games</a>
</div>
</div>
<div>
<a class="menu" title="Help" href="#Help">Help</a>
<div>
<a class="submenu" title="" href="#Help_FAQ">FAQ</a>
<a class="submenu" title="" href="#Help_Ask Help Online">
Ask Help Online</a>
</div>
</div>
<div>
<a class="menu" id="right" title="Log Out" href="#Log Out">Log Out</a>
</div>
</div>
<div id="container">
<p><h1>Welcome!</h1></p>
<p>With this site, you'll learn many thing that you want to
learn, but only that is all is available!<p>
</div>
<div id="special"><div id="txt"></div></div>
</div>
</body>
</html>
<head>
<title>My_Site</title>
</head>
<body onload="startTime()">
<div>
<div>
<div>
<a class="menu" title="Home" href="#Home">Home</a>
<div>
<a class="submenu" title="" href="#Home_Wall">Wall</a>
<a class="submenu" title="" href="#Home_Profile">
Profile</a>
<a class="submenu" title="" href="#Home_PM's">PM's</a>
<a class="submenu" title="" href="#Home_Security and
Privacy">Security and Privacy</a>
</div>
</div>
<div>
<a class="menu" title="Forum" href="#Forum">Forum</a>
<div>
<a class="submenu" title="" href="#Forum_Programs">Programs</a>
<a class="submenu" title="" href="#Forum_Friends">Friends</a>
<a class="submenu" title="" href="#Forum_Games">Games</a>
</div>
</div>
<div>
<a class="menu" title="Help" href="#Help">Help</a>
<div>
<a class="submenu" title="" href="#Help_FAQ">FAQ</a>
<a class="submenu" title="" href="#Help_Ask Help Online">
Ask Help Online</a>
</div>
</div>
<div>
<a class="menu" id="right" title="Log Out" href="#Log Out">Log Out</a>
</div>
</div>
<div id="container">
<p><h1>Welcome!</h1></p>
<p>With this site, you'll learn many thing that you want to
learn, but only that is all is available!<p>
</div>
<div id="special"><div id="txt"></div></div>
</div>
</body>
</html>
- <html>
- <head>
- <title>My_Site</title>
- </head>
- <body onload="startTime()">
- <div>
- <div>
- <div>
- <a class="menu" title="Home" href="#Home">Home</a>
- <div>
- <a class="submenu" title="" href="#Home_Wall">Wall</a>
- <a class="submenu" title="" href="#Home_Profile">
- Profile</a>
- <a class="submenu" title="" href="#Home_PM's">PM's</a>
- <a class="submenu" title="" href="#Home_Security and
- Privacy">Security and Privacy</a>
- </div>
- </div>
- <div>
- <a class="menu" title="Forum" href="#Forum">Forum</a>
- <div>
- <a class="submenu" title="" href="#Forum_Programs">Programs</a>
- <a class="submenu" title="" href="#Forum_Friends">Friends</a>
- <a class="submenu" title="" href="#Forum_Games">Games</a>
- </div>
- </div>
- <div>
- <a class="menu" title="Help" href="#Help">Help</a>
- <div>
- <a class="submenu" title="" href="#Help_FAQ">FAQ</a>
- <a class="submenu" title="" href="#Help_Ask Help Online">
- Ask Help Online</a>
- </div>
- </div>
- <div>
- <a class="menu" id="right" title="Log Out" href="#Log Out">Log Out</a>
- </div>
- </div>
- <div id="container">
- <p><h1>Welcome!</h1></p>
- <p>With this site, you'll learn many thing that you want to
- learn, but only that is all is available!<p>
- </div>
- <div id="special"><div id="txt"></div></div>
- </div>
- </body>
- </html>
JAVASCRIPT Code: [ Select ]
<script type="text/javascript">
function startTime()
{
var today= new Date();
var h= today.getHours();
var m= today.getMinutes();
var s= today.getSeconds();
var d;
// add a zero in front of numbers<10
d = checkPerHalfDay(d, h);
h = checkIfMoreThanHalf(h);
h = checkTime(h);
m = checkTime(m);
s = checkTime(s);
document.getElementById('txt').innerHTML = h + ":" + m + ":" + s + " " + d;
t = setTimeout('startTime()',500);
}
function checkPerHalfDay(d, h)
{
if (h < 12)
{
d = "am";
}
else
{
d = "pm";
}
return d;
}
function checkIfMoreThanHalf(h)
{
if (h > 12)
{
h = h - 12;
}
return h;
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
function startTime()
{
var today= new Date();
var h= today.getHours();
var m= today.getMinutes();
var s= today.getSeconds();
var d;
// add a zero in front of numbers<10
d = checkPerHalfDay(d, h);
h = checkIfMoreThanHalf(h);
h = checkTime(h);
m = checkTime(m);
s = checkTime(s);
document.getElementById('txt').innerHTML = h + ":" + m + ":" + s + " " + d;
t = setTimeout('startTime()',500);
}
function checkPerHalfDay(d, h)
{
if (h < 12)
{
d = "am";
}
else
{
d = "pm";
}
return d;
}
function checkIfMoreThanHalf(h)
{
if (h > 12)
{
h = h - 12;
}
return h;
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
- <script type="text/javascript">
- function startTime()
- {
- var today= new Date();
- var h= today.getHours();
- var m= today.getMinutes();
- var s= today.getSeconds();
- var d;
- // add a zero in front of numbers<10
- d = checkPerHalfDay(d, h);
- h = checkIfMoreThanHalf(h);
- h = checkTime(h);
- m = checkTime(m);
- s = checkTime(s);
- document.getElementById('txt').innerHTML = h + ":" + m + ":" + s + " " + d;
- t = setTimeout('startTime()',500);
- }
- function checkPerHalfDay(d, h)
- {
- if (h < 12)
- {
- d = "am";
- }
- else
- {
- d = "pm";
- }
- return d;
- }
- function checkIfMoreThanHalf(h)
- {
- if (h > 12)
- {
- h = h - 12;
- }
- return h;
- }
- function checkTime(i)
- {
- if (i<10)
- {
- i="0" + i;
- }
- return i;
- }
- </script>
CSS Code: [ Select ]
<style type="text/css">
body
{
background-image: url('Diamond_Tiles.jpg');
background-position: top center;
margin: 30px;
padding: 0px;
width: 93%;
height: 100%;
}
.menu
{
font-family:"Times New Roman", Times, serif;
font-size: 23px;
font-weight: 700;
z-index: 1;
overflow: hidden;
}
.submenu
{
font-family:"Arial";
font-size: 16px;
font-weight: 600;
width: 100%;
height: 100%;
z-index: 1;
overflow: hidden;
}
div#container, div#container p
{
background-color: cyan;
z-index: -1;
}
#right
{
float: right;
}
#special
{
background-color: lightgreen;
height: 20px;
font-weight: 600;
}
div
{
background-color: black;
color: red;
margin: auto;
padding: 10px;
height: 500px;
}
div div
{
background-color: skyblue;
margin: auto;
padding: auto;
width: auto;
height: auto;
}
div div div
{
display: inline-block;
margin: auto;
padding: 0px;
vertical-align: top;
width: 24%;
height: 0px;
}
div div div div
{
display: none;
margin: auto;
padding: 0px;
width: 100%;
height: auto;
}
div div div:hover div
{
display: block;
margin: auto;
padding: 0px;
width: 100%;
height: auto;
}
div div div a
{
background-color: lime;
color: blue;
display: block;
text-decoration: none;
}
div div div a:hover
{
background-color: green;
color: gold;
display: block;
margin: 0px;
padding: 0px;
text-align: center;
text-decoration: none;
}
div div div a:active
{
background-color: red;
color: yellow;
display: block;
margin: 0px;
padding: 0px;
text-align: left;
text-decoration: none;
}
div div div div a
{
background-color: black;
color: skyblue;
display: block;
margin: 0px;
padding: 0px;
text-align: left;
text-decoration: none;
}
div div div div a:hover
{
background-color: silver;
color: cyan;
display: block;
margin: 0px;
padding: 0px;
text-align: left;
text-decoration: none;
z-index: 1;
}
div div div div a:active
{
background-color: cyan;
color: blue;
display: block;
margin: 0px;
padding: 0px;
text-align: left;
text-decoration: none;
}
</style>
body
{
background-image: url('Diamond_Tiles.jpg');
background-position: top center;
margin: 30px;
padding: 0px;
width: 93%;
height: 100%;
}
.menu
{
font-family:"Times New Roman", Times, serif;
font-size: 23px;
font-weight: 700;
z-index: 1;
overflow: hidden;
}
.submenu
{
font-family:"Arial";
font-size: 16px;
font-weight: 600;
width: 100%;
height: 100%;
z-index: 1;
overflow: hidden;
}
div#container, div#container p
{
background-color: cyan;
z-index: -1;
}
#right
{
float: right;
}
#special
{
background-color: lightgreen;
height: 20px;
font-weight: 600;
}
div
{
background-color: black;
color: red;
margin: auto;
padding: 10px;
height: 500px;
}
div div
{
background-color: skyblue;
margin: auto;
padding: auto;
width: auto;
height: auto;
}
div div div
{
display: inline-block;
margin: auto;
padding: 0px;
vertical-align: top;
width: 24%;
height: 0px;
}
div div div div
{
display: none;
margin: auto;
padding: 0px;
width: 100%;
height: auto;
}
div div div:hover div
{
display: block;
margin: auto;
padding: 0px;
width: 100%;
height: auto;
}
div div div a
{
background-color: lime;
color: blue;
display: block;
text-decoration: none;
}
div div div a:hover
{
background-color: green;
color: gold;
display: block;
margin: 0px;
padding: 0px;
text-align: center;
text-decoration: none;
}
div div div a:active
{
background-color: red;
color: yellow;
display: block;
margin: 0px;
padding: 0px;
text-align: left;
text-decoration: none;
}
div div div div a
{
background-color: black;
color: skyblue;
display: block;
margin: 0px;
padding: 0px;
text-align: left;
text-decoration: none;
}
div div div div a:hover
{
background-color: silver;
color: cyan;
display: block;
margin: 0px;
padding: 0px;
text-align: left;
text-decoration: none;
z-index: 1;
}
div div div div a:active
{
background-color: cyan;
color: blue;
display: block;
margin: 0px;
padding: 0px;
text-align: left;
text-decoration: none;
}
</style>
- <style type="text/css">
- body
- {
- background-image: url('Diamond_Tiles.jpg');
- background-position: top center;
- margin: 30px;
- padding: 0px;
- width: 93%;
- height: 100%;
- }
- .menu
- {
- font-family:"Times New Roman", Times, serif;
- font-size: 23px;
- font-weight: 700;
- z-index: 1;
- overflow: hidden;
- }
- .submenu
- {
- font-family:"Arial";
- font-size: 16px;
- font-weight: 600;
- width: 100%;
- height: 100%;
- z-index: 1;
- overflow: hidden;
- }
- div#container, div#container p
- {
- background-color: cyan;
- z-index: -1;
- }
- #right
- {
- float: right;
- }
- #special
- {
- background-color: lightgreen;
- height: 20px;
- font-weight: 600;
- }
- div
- {
- background-color: black;
- color: red;
- margin: auto;
- padding: 10px;
- height: 500px;
- }
- div div
- {
- background-color: skyblue;
- margin: auto;
- padding: auto;
- width: auto;
- height: auto;
- }
- div div div
- {
- display: inline-block;
- margin: auto;
- padding: 0px;
- vertical-align: top;
- width: 24%;
- height: 0px;
- }
- div div div div
- {
- display: none;
- margin: auto;
- padding: 0px;
- width: 100%;
- height: auto;
- }
- div div div:hover div
- {
- display: block;
- margin: auto;
- padding: 0px;
- width: 100%;
- height: auto;
- }
- div div div a
- {
- background-color: lime;
- color: blue;
- display: block;
- text-decoration: none;
- }
- div div div a:hover
- {
- background-color: green;
- color: gold;
- display: block;
- margin: 0px;
- padding: 0px;
- text-align: center;
- text-decoration: none;
- }
- div div div a:active
- {
- background-color: red;
- color: yellow;
- display: block;
- margin: 0px;
- padding: 0px;
- text-align: left;
- text-decoration: none;
- }
- div div div div a
- {
- background-color: black;
- color: skyblue;
- display: block;
- margin: 0px;
- padding: 0px;
- text-align: left;
- text-decoration: none;
- }
- div div div div a:hover
- {
- background-color: silver;
- color: cyan;
- display: block;
- margin: 0px;
- padding: 0px;
- text-align: left;
- text-decoration: none;
- z-index: 1;
- }
- div div div div a:active
- {
- background-color: cyan;
- color: blue;
- display: block;
- margin: 0px;
- padding: 0px;
- text-align: left;
- text-decoration: none;
- }
- </style>
Merci d'avance pour aider / directeurs / me dire!
- Anonymous
- Bot


- Inscription: 25 Feb 2008
- Messages: ?
- Loc: Ozzuland
- Status: Online
Novembre 4th, 2010, 9:10 am
- dycemen
- Born


- Inscription: Nov 03, 2010
- Messages: 4
- Status: Offline
- Jan Jeremy Go
- Newbie


- Inscription: Oct 20, 2010
- Messages: 13
- Loc: Philippines
- Status: Offline
- Jan Jeremy Go
- Newbie


- Inscription: Oct 20, 2010
- Messages: 13
- Loc: Philippines
- Status: Offline
- Bogey
- Bogey


- Inscription: Juil 14, 2005
- Messages: 8211
- Loc: USA
- Status: Offline
Pour être en mesure d'utiliser z-index vous devez définir une propriété CSS position.
CSS Code: [ Select ]
.overlappingTag {
position: relative;
z-index: 2;
}
.overlappedTag {
position: relative;
z-index: 1;
}
position: relative;
z-index: 2;
}
.overlappedTag {
position: relative;
z-index: 1;
}
- .overlappingTag {
- position: relative;
- z-index: 2;
- }
- .overlappedTag {
- position: relative;
- z-index: 1;
- }
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
- Jan Jeremy Go
- Newbie


- Inscription: Oct 20, 2010
- Messages: 13
- Loc: Philippines
- Status: Offline
Page 1 sur 1
Pour répondre à ce sujet, vous devez vous connecter ou vous enregistrer. Il est gratuit.
Afficher de l'information
- Total des messages de ce sujet: 7 messages
- Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 159 invités
- Vous ne pouvez pas poster de nouveaux sujets
- Vous ne pouvez pas répondre aux sujets
- Vous ne pouvez pas éditer vos messages
- Vous ne pouvez pas supprimer vos messages
- Vous ne pouvez pas joindre des fichiers
