We use cookies to ensure you get the best experience on our website. Read our privacy policy

Skip to main content

Directory

Absolute Container

The absolute container found in the src/layouts/BareLayout.astro layout file is used to position components that need to be on top of all other content such as modals, popups, and notifications.

It is useful because it conforms to the page contents dynamic padding. Setting the width of an element in the container to 100% will keep it within the page contents padding instead of the full width of the page.

Items can be added to the absolute container by adding the absolute-container slot attribute, or dynamically adding them the the container using the appendChild method.

North Star Themes Logo

Subscribe to our newsletter

Get the latest AstroJS tips and tricks right to your inbox

Email: [email protected]

© 2025 North Star Themes

Web Kit Provided By North Star Themes