programming-examples/css/Absolute container and absolute children.html

56 lines
1.0 KiB
HTML
Raw Permalink Normal View History

2019-11-15 12:59:38 +01:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>CSS Positioning Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style rel="stylesheet" type="text/css">
div,h1,p {
border: 1px solid #FF00FF;
margin: 4px;
background-color: #ffffff;
}
div {
width: 400px;
height: 160px;
}
div#page1 {
position: absolute;
top: 20px;
left: 20px;
}
p.paragraph1 {
position: absolute;
top: 40px;
left: 20px;
width: 300px;
}
p.paragraph2 {
position: absolute;
top: 90px;
left: 20px;
width: 300px;
}
</style>
</head>
<body>
<div id="page1">
<h1>CSS Positioning Example</h1>
<p class="paragraph1">This is paragraph one. <br><br>
Truly love you endlessly.<br>
Every day without you is like a book without pages.<br>
I love you, I will always do, for the rest of our earthly and heavenly life.<br>
<br><br>
F. Abahusain
</p>
<p class="paragraph2">This is paragraph two.</p>
</div>
</body>
</html>