HTML CSS SQL Meta tag Generator ScrollBar design Generator Encode Decode images

CSS Basics

Introduction Syntax Selectors Attribute Selectors Specificity Combinators !important Comments Colors

CSS Need to Know

Box Model Pseudo-class Pseudo-element Inline-block Math Functions Max and Min Opacity Outline Overflow Z-index Float

Most used

Align Backgrounds Borders Text Units Padding Margins Position Tables Display Fonts Lists Height and Width

CSS Reference

CSS Properties reference CSS Pseudo-Classes reference CSS Pseudo-Elements reference CSS Selector reference

CSS scroll-margin-inline-end

The scroll-margin-inline-end property specifies the block-end that will be used as an offset for the scroll snap area. This property applies to block-level elements such as <div>, <p>, and <section>.

When using scroll-margin-inline-end, the browser will reserve space at the block-end of the scroll container. This means that when an anchor is linked, the target element will be offset from the block-end of the scroll container by the specified amount.

Let's see an example to better understand how scroll-margin-inline-end works:

Result:

    <div style="scroll-margin-inline-end: 20px;">
      <p>Example text inside a div element.</p>
      <p>Another example text inside a div element.</p>
    </div>
  

Example text inside a div element.

Another example text inside a div element.

In the example above, we have a <div> element with a scroll-margin-inline-end of 20px. This will create a scroll snap area at the block-end of the <div> element, offsetting the content by 20px.

You can adjust the value of scroll-margin-inline-end to control the offset amount for the scroll snap area.

.ninja{
    visibility: hidden;
    color: black;
}