Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
margin
Промени стойностите на margin-ите(в червено) и виж как се променя позицията на вложеният див спрямо родителският<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#main {
position:absolute;
width:400px;
height:400px;
border:solid 1px red;
}
#second {
width:200px;
height:200px;
border:solid 1px blue;
margin-top:80px;
margin-left:40px;
position:absolute;
}
</style>
</head>
<body>
<div id="main">
<div id="second">
</div>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#main {
position:absolute;
width:400px;
height:400px;
border:solid 1px red;
padding-top:40px;
padding-left:40px;
}
#second {
width:200px;
height:200px;
border:solid 1px blue;
}
</style>
</head>
<body>
<div id="main">
<div id="second">
</div>
</div>
</body>
</html>