Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix footer not sticky on the bottom #1173

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/(app)/my-posts/_client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const MyPosts = () => {
cancelText="Cancel"
/>
)}
<div className="relative mx-4 max-w-2xl bg-neutral-100 dark:bg-black sm:mx-auto">
<div className="relative mx-4 min-h-96 max-w-2xl bg-neutral-100 dark:bg-black sm:mx-auto">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider a more robust layout solution.

While adding minimum height works, consider implementing a more robust sticky footer solution using flex layout to ensure consistent behavior across all pages:

-      <div className="relative mx-4 min-h-96 max-w-2xl bg-neutral-100 dark:bg-black sm:mx-auto">
+      <div className="relative mx-4 flex min-h-[calc(100vh-theme('spacing.header'))] max-w-2xl flex-col bg-neutral-100 dark:bg-black sm:mx-auto">

This approach:

  • Uses viewport height calculation
  • Accounts for header height (adjust theme('spacing.header') to match your header height)
  • Ensures content fills available space
  • Works consistently across all viewport sizes

Committable suggestion was skipped due to low confidence.

<div className="mb-4 mt-8">
<Tabs tabs={tabs} />
</div>
Expand Down
10 changes: 0 additions & 10 deletions sample.env

This file was deleted.

Loading