I am using 'position relative' and 'position absolute' on my master page.
I have a page that use the above master page, And I am trying to use in this page the 'Position relative' and 'position absolute' again for 2 other elements, but the element below ('position absolute') in this page is not placed according to the element above his ('position relative') and instead it refers to the 'position relative' of the element in the master page..
Hope is was not too clumsy explanation..
Is it possible to use 'position relative' more than once on the same HTML page??? If so, how??
html codes
<html>
<head>
<title></title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="basic.css">
</head>
<body>
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
<div class="four"></div>
</body>
</html>
css codes body{ margin: 0px; padding: 0px; }
.one{
width: 200px;
height: 200px;
background: red;
position: relative;
}
.two{
width: 200px;
height: 200px;
background: green;
position: absolute;
top: 0px;
left: 200px;
}
.three{
width: 200px;
height: 200px;
background: blue;
position: relative;
}
.four{
width: 200px;
height: 200px;
background: black;
position: absolute;
top: 0px;
left: 200px;
}