ASDV-WebDev/Semester 1/Chapter ZIPs/HTML/chapter7/absolute.html

23 lines
568 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Absolute Positioning</title>
<meta charset="utf-8">
<style>
h1 { background-color:#cccccc;
padding:5px;
color: #000000;
}
p {position: absolute;
left:200px;
top:100px;
font-family:Arial,sans-serif;
width:300px;
}
</style>
</head>
<body>
<h1>Absolute Positioning</h1>
<p>This paragraph is 300 pixels wide and uses CSS absolute positioning to be placed 200 pixels in from the left and 100 pixels down from the top of the browser window.</p>
</body>
</html>