x
<html>
<head>
<title>CSS tutorial</title>
<style type="text/css">
div {
position:relative;
margin: 40px;
border:2px dashed #222;
}
h3 {
position:absolute;
margin-top:-25px;
}
p {
position:relative;
margin-top:25px;
margin-left:5%;
}
</style>
</head>
<body>
<div>
<h3>This is the content's title</h3>
<p>The title <h3> and the following paragraphs <p> are contained within the <div> containing block.<p>
<p>The title ended up out of its containing block, due being positioned absolutely.</p>
</div>
</body>
</html>
Comments
No comments have been made yet.
Please login to leave a comment. Login now