I have been using CSS for many years now, and I have always been a \'percentage\' kind of guy, as in I always define heights and widths using percentages as opposed to pixel
in inner style top property is in % so it will count as 200px*0.3=60px
#outer{
border-style: dotted;
position: relative;
height: 200px;
}
#inner{
border-style: double;
position: absolute;
top: 30%; <<<<<<<<<<<<<<
}
outer
inner
Here top is 30px . so it will be as it is.
#outer{
border-style: dotted;
position: relative;
height: 200px;
}
#inner{
border-style: double;
position: absolute;
top: 30px; <<<<<<<<<<<<
}
outer
inner