I have two div tags as below
<div id="outer">
<div id="lower">hi</div>
<div id="upper">i m on top</div>
</div>
I want to display the upper div first, followed by the lower div but I can not change the declaration order in HTML.
I am using the following css
#outer{
position:relative;
}
#upper{
position:absolute;
top:0;
}
But the upper is overlapping with lower.
UPDATE
I tackled the situation in following way as it does not disturb the design
<html>
<body>
<div id="visible"></div>
<div id="bottom">displayed in second line</div>
<div id="top" style="display:none;">
displayed in first line
<script>
document.getElementById("visible").innerHTML=document.getElementById("top").innerHTML
</script>
</div>
</body>
</html>
By using the above code i perfectly tackled my use case. Thanks for everyone for giving answers