Home HTML CSS JAVASCRIPT BOOTSTRAP Python Docker ML tutorial About us Privacy policy

position Property


position Property:-



The position property define the many types of positioning method using for the element like (static, relative, fixed, absolute or sticky).
some method of position method:-
The position property define some type of positioning method using for an elements.

  • static
  • relative
  • fixed
  • absolute
  • sticky

  • Elements positioned using the top, bottom, left, and right properties in html page.

    position: static in css:-

    static position is by default set in HTML element.
    Static elements are do not affected by the top, bottom, left, and right properties in HTML

    position: relative:-

    position: relative; is relative to its normal position of element. Setting the top, right, bottom, and left properties of the element.

    position: fixed:-

    An element with position: fixed;
    A fixed element does not leave a any gap in the HTML page where it would normally have been located

    position: absolute:-

    the element with position: absolute; is positioning is relative to the nearest positioned element.

    position: sticky:-

    the element with position: sticky is positioning based on the user's scroll position.



    More Topics