Source Code: (back to article)
<!DOCTYPE html>
<html>
<head>
<title>Titre du document</title>
<style>
div {
background-color: #666;
height: 200px;
position: relative;
}
p {
margin: 0;
color: #fff;
}
.top{
position: absolute;
top: -35px;
color: #000000;
}
</style>
</head>
<body>
<h2>Exemple de la propriété top</h2>
<div>
<p>Quelque texte.</p>
<p class="top">Texte avec la propriété top.</p>
</div>
</body>
</html>