bonjour,
j'ai un menu horizontal mais 2 PB:
- comment centrer mon menu?
- comment aligner sous l'étiquette correspondante le sous menu?
exemple ici
j'ai un menu horizontal mais 2 PB:
- comment centrer mon menu?
- comment aligner sous l'étiquette correspondante le sous menu?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>Menu horizontal déroulant sur une ligne en CSS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
<!--
window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
for (var i = 1; i<=10; i++) {
if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
}
if (d) {d.style.display='block';}
}
//-->
</script>
<style type="text/css">
<!--
/* CSS issu des tutoriels www.alsacreations.com/articles */
body
{
margin: 5px;
padding: 0;
font: 80% Verdana, sans-serif;
color: #CC0000;
}
dt, dl, dd, ul, li {
list-style-type: none;
text: red;
margin: 0 1.5px 0 4px;
padding: 0;
}
#menu {
position : center;
left: 0px;
top: 0px;
}
#menu dl {
float: left;
border-bottom: 2px solid #CC0000;
border-left: 2px solid #CC0000;
}
#menu li {
display: inline;
border-left: 1px solid #CC0000;
text-align: center;
}
#menu a {
text-decoration: none;
color: #000;
background: #fff;
color: #CC0000;
}
#smenu1, #smenu2, #smenu3, #smenu4, #smenu6, #smenu7, #smenu8, #smenu9, #smenu10, #smenu5 {
position: absolute;
left: 0;
font-size: 90%;
border-top: 0px;
width: 800px;
margin: 5px 0;
text-align: absolute;
}
.mentions {
position: absolute;
bottom : 300px;
left : 10px;
color: #000;
background-color: #ddd;
}
a {text-decoration: none;
color: #222;
}
-->
</style>
</head>
<body>
exemple ici