How to Make a Joomla Module Sticky or Floating

Learn how to make a Joomla module sticky or floating with CSS or a reusable wrapper, including desktop and mobile positioning.

A sticky or floating Joomla module stays visible while the visitor scrolls, or sits in a fixed position at the edge of the browser window. It can be useful for contact buttons, menus, login forms, notices, search, support links and other actions that should remain easy to reach.

The implementation can be as simple as CSS for a basic sticky block, or it can require a dedicated module when you want a slide-out panel, mobile-specific behavior, a close button or precise screen positioning.

Joomla content module connected to a sticky container with desktop and mobile floating positions

Sticky and fixed are not exactly the same

Two CSS behaviors are commonly described as “sticky”.

position: sticky

A sticky element behaves like normal page content until the page reaches a defined offset, then it remains attached within its scrolling context.

Example:

.my-sticky-module {
    position: sticky;
    top: 20px;
}

This is useful for a sidebar module that should remain visible while its surrounding column is being scrolled.

position: fixed

A fixed element is positioned relative to the browser viewport and can remain at the same screen location regardless of the page content.

Example:

.my-floating-contact {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
}

This is more appropriate for floating contact buttons, side tabs or bottom bars.

When CSS alone is enough

Custom CSS may be enough when:

  • you already know the module wrapper class or ID;
  • you only need one fixed or sticky position;
  • there is no open/close interaction;
  • desktop and mobile can use the same basic behavior;
  • your template structure does not interfere with sticky positioning.

This is often the simplest solution for a basic sidebar.

Why a sticky CSS rule sometimes appears not to work

position: sticky depends on the surrounding layout. A parent container with certain overflow behavior, limited height or a transformed layout can change the element's sticky behavior.

If the element does not stick:

  • inspect the module wrapper and its parent containers;
  • check the effective overflow values;
  • confirm you set a top or other offset;
  • check whether the sticky element has enough scrolling space;
  • test in the real template position, not only in an isolated example.

When a dedicated sticky module is more practical

CSS becomes less convenient when you want:

  • a slide-out side panel;
  • a clickable handle;
  • a dismissible pop-up style panel;
  • different desktop and mobile positions;
  • the same sticky system to host any Joomla module;
  • a bottom bar on mobile but a side panel on desktop.

That is where a wrapper module can make the workflow easier to manage from Joomla's administrator interface.

Use SJ Sticky Any Module as a wrapper

SJ Sticky Any Module is designed to place another Joomla module in a floating or sticky screen position.

The key idea is that you use two modules:

  1. Content Module — the real content, such as Custom HTML, Login, Menu or another Joomla module.
  2. Sticky Container — SJ Sticky Any Module, which finds that content and controls how it is displayed.

Step 1: create the content module

Open:

Content → Site Modules

Create or edit the module you want to make sticky.

Instead of assigning it to a normal template position, type a custom position name, for example:

sticky-contact

Publish the content module.

This custom position acts as the connection between the content and the sticky container.

Step 2: create the sticky container

Create a new SJ Sticky Any Module.

Assign the sticky container itself to a real template position that is rendered on the required pages. A low-impact position such as a template utility or debug position can be useful for testing, depending on the template.

In the module's setup, enter the same custom position name:

Sticky position name:
sticky-contact

The names must match exactly.

Example: floating contact tab

A common setup is:

Custom HTML module
Position: sticky-contact

SJ Sticky Any Module
Sticky position name: sticky-contact
Desktop position: right side
Panel start: closed
Click element: handle

The visitor sees a compact Contact tab at the edge of the screen and opens the full module only when needed.

Example: sticky login panel

The same approach works with Joomla's Login module.

Publish the Login module to a custom position such as:

sticky-login

Then configure the sticky wrapper to load sticky-login.

This lets the login form remain available without permanently occupying a normal template column.

Desktop and mobile should not be treated as the same layout

A 300px side panel that works well on desktop may cover most of a phone screen.

SJ Sticky Any Module provides responsive behavior so the module can react at a defined mobile breakpoint.

Depending on the use case, you can:

  • keep the desktop position;
  • disable the sticky module on mobile;
  • let it become static in the normal page flow;
  • override the desktop position with a mobile sticky bar.

Example: side panel on desktop, bottom bar on mobile

A useful responsive pattern is:

Desktop:
Right-side slide-out panel

Mobile:
100% width sticky bottom bar

This keeps the interaction reachable without forcing the desktop geometry onto a small screen.

Think about overlap before publishing

Floating elements can cover important interface elements such as:

  • cookie-consent buttons;
  • chat widgets;
  • mobile menus;
  • checkout buttons;
  • back-to-top controls;
  • browser safe areas on phones.

Always test the exact pages where the sticky module will appear.

Keep the sticky action small

A floating control should earn the screen space it occupies.

Good candidates are actions that users may need from many points on the page:

  • Contact;
  • Menu;
  • Login;
  • Search;
  • Help;
  • Cart or account access where appropriate.

A full marketing block that permanently covers content is rarely a good sticky element.

Troubleshooting: the sticky panel is empty

The most common cause is a mismatch between the two position names.

Check:

Content module Position
=
SJ Sticky Any Module → Sticky position name

For example, sticky-contact and sticky_contact are different values.

Troubleshooting: the content appears twice

If the content module also appears in the normal page layout, it has probably been assigned to a real template position as well as the custom sticky position.

The content module should normally be published only to the custom position used by the sticky wrapper.

Troubleshooting: the module is visible on the wrong pages

Check the Menu Assignment of the sticky container. The container is the module that controls where the sticky behavior is loaded.

Also inspect the menu assignment of the content module if its own configuration is more restrictive.

Frequently asked questions

Can I make any Joomla module sticky?

Yes, when the module can be published to a custom position and loaded by the sticky wrapper. Common examples include Menu, Login and Custom HTML modules.

Do I need a dedicated extension for a simple sticky sidebar?

Not always. A small CSS rule using position: sticky may be enough when your template structure supports it and no extra interaction is required.

Can I use a different sticky position on mobile?

Yes. SJ Sticky Any Module includes mobile behavior options, including an override mode that can use a full-width top or bottom sticky bar.

Why does my content module appear twice?

It is probably still assigned to a normal template position. Publish it to the custom position used by the sticky container instead.

Summary

For a basic sticky sidebar, start with CSS. For a reusable Joomla workflow that needs floating handles, slide-out panels, mobile overrides or any-module support, use a dedicated wrapper and separate the content module from the sticky container.

See the SJ Sticky Any Module documentation for detailed setup scenarios and responsive options.