Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.07 KB

File metadata and controls

39 lines (29 loc) · 1.07 KB

🎨

Position

  • static

    is not positioned in any special way; it is always positioned according to the normal flow of the page

  • relative

    positioned relative to its normal position.
    Setting the top, right, bottom, and left properties of a relatively-positioned element will cause it to be adjusted away from its normal position. Other content will not be adjusted to fit into any gap left by the element.

  • fixed

    is positioned relative to the viewport, which means it always stays in the same place even if the page is scrolled.

  • absolute

    positioned relative to the nearest positioned ancestor.

  • sticky

    positioned based on the user's scroll position.

  • Regular

      table, th, td {
        border: 1px solid black;
      }
    
  • Collapse

      table {
        border-collapse: collapse;
      }
    
      table, th, td {
        border: 1px solid black;
      }
    
  • a border around the table

      table {
        border: 1px solid black;
      }