Element not moving from top
within a parent element position relative, i include position absolute in an p element but the "p" element not moving when i include “top” position..look at the code below.. <div class="btnClass"> <p>ghghg</p> </div> and the css - .btnClass{ position: relative; } p{ position: absolute; top: 20%;/*this is not working*/ left: 15%; border: 1px solid red; display: block; } The parent btnClass need a height Note, a div 's width defaults to browser viewport, its height by its content or explicit set, hence the left: 15% work but the top: 20% not .btnClass { position: relative; height: 200px; } p {