You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
programming-examples/css/Div tag position relative a...

37 lines
1.1 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Div Tag Position Relative Absolute</title>
<style type='text/css'>
div {
padding: 12px;
border: 1px solid pink;
opacity: 0.7;
background: yellow;
}
div#div1 {
position: relative;
margin: 40px;
}
div#div2 {
position: absolute;
top: 23px;
left: 23px;
}
</style>
</head>
<body>
<div id='div1'>
When love is in excess it brings a man no honor nor worthiness.<br><br>
Euripides
<div id='div2'>
Love is not enough. It must be the foundation,<br>
the cornerstone - but not the complete structure.<br>
It is much too pliable, too yielding.<br><br>
Bette Davis
</div>
</div>
</body>
</html>