Lock an Element to its Parent with Absolute Positioning:explain

why we use relative? Though i have gone through some of the documents but i am not able to understand that the element relative to which element?:

Your code so far

  #searchbar {
    position: absolute;
    top: 50px;
    right: 50px;
  section {
    position: relative;
    <form id="searchbar">
      <label for="search">Search:</label>
      <input type="search" id="search" name="search">
      <input type="submit" name="submit" value="Go!">

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:

Hi @krishnan468

Consider two elements "A (Parent - Relative)" and "B (Child - Absolute)"

If the ‘Position’ for A is set as “relative”, it means we are setting up a playground for the child elements of A
Note: "A" acts as a playground only for child elements which has property “absolute” such as "B" in this case.
Playground in the sense, “B” can be moved anywhere within the “parent” block using the properties "top, left, bottom, right, transform"
When an element is absolute it will stand top of other elements (but inside the parent element) around it, thus allows other elements o occupy its space.