Citation :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Test CSS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
body {
background: rgb(154,168,182);
text-align: center;
padding: 0px;
margin: 0px;
}
.conteneur {
width: 100%;
}
#main {
margin: 10px auto;
width: 80%;
border: 1px black solid;
}
h1,h2,h3 {
margin: 0px;
padding: 1em;
border: 1px black none;
border-bottom-style: solid;
}
h1 {
background: rgb(200,200,200);
font: normal 25px sans-serif;
}
h2 {
background: rgb(190,190,190);
font: normal 16px sans-serif;
}
h3 {
background: rgb(200,200,200);
font: normal 16px sans-serif;
}
p {
margin: 0px;
padding: 1em;
}
/* Liste */
#navcontainer {
float: left;
width: 20%;
border: 1px black solid;
border-left: none;
padding: 0px;
margin-top: 20px;
font: bold 12px sans-serif;
}
#navcontainer ul {
list-style: none;
border: none;
margin: 0px;
padding: 0px;
}
#navcontainer li {
margin: 0px;
text-indent: 15px;
text-align: left;
}
#navcontainer li a {
display: block;
line-height: 32px;
vertical-align: middle;
border-left: 15px solid rgb(38,75,113);
background-color: rgb(230,230,230);
color: rgb(140,140,140);
text-decoration: none;
width: 100%;
}
html>body #navcontainer li a {
width: auto;
}
#navcontainer li a:hover {
border-left: 15px rgb(245,153,14) solid;
background-color: rgb(210,210,210);
color: black;
}
</style>
</head>
<body>
<div class="conteneur">
<div id="main">
<h1>Titre de la page</h1>
<h2>page de code</h2>
<h3>hop</h3>
<div id="navcontainer">
<ul>
<li><a href="#">Menu truc 1</a></li>
<li><a href="#">Menu truc 2</a></li>
<li><a href="#">Menu truc 3</a></li>
<li><a href="#">Menu truc 4</a></li>
<li><a href="#">Menu truc 5</a></li>
</ul>
</div>
<p>plop</p>
<p>plop</p>
<p>plop</p>
<p>plop</p>
</div>
</div>
</body>
</html>
|