Dev Helpers
← Back

Target an anchor with breathing room

Target an anchor with breathing room with Tailwind CSS 4 utilities. The preview uses precompiled styles.

Open this example in the interactive library

Source code

<div class="demo overflow-y-auto scroll-pt-4 h-24">
  <a href="#end">Jump to end</a>
  <p style="height: 8rem">Scrollable content</p>
  <p id="end" style="min-height: 5rem">Target with top padding</p>
</div>