Keep your mobile navigation and the cookie banner buttons visible
The TermsFeed Privacy Consent cookie banner sits fixed at the bottom of the screen, above your page, until the visitor answers. It never pushes your content down, so anything else fixed to the bottom of the screen needs the same space. The consent banner leaves the page as soon as the visitor clicks I Agree, I Decline, or Close.
The fixes are CSS rules in your own stylesheet. Privacy Consent adds its stylesheet at the end of the <head> when it loads, after yours, so start every rule with the root ID #termsfeed_pc1_notice_banner, as the examples do. An ID outranks the class rules Privacy Consent uses in any order. The same rules work in "Custom CSS" on the Appearance page, which Privacy Consent adds after its own stylesheet.
The examples use max-width: 992px, a width where the consent banner stacks its text and buttons in some layouts. Change the value to the width where your own bottom bar appears. Check each selector with the DOM and CSS Selectors after a Privacy Consent update.
Cause 1: A navigation bar fixed to the bottom of the screen
A bottom navigation bar or a sticky add-to-cart bar sits in the same place as the consent banner. The consent banner uses z-index: 9999. A bar with a lower value disappears under the consent banner. A bar with a higher value hides the I Agree and I Decline buttons, which leaves the visitor unable to answer.
The Elements tab of Chrome DevTools shows the overlap. Select your bar, open the Computed pane, and read position, bottom, and z-index. A bar with fixed and bottom: 0px shares the space, while a bar fixed to the top of the screen stays clear of the consent banner.
Lift the consent banner above your bar with this rule, using the height of your bar in place of 64px.
@media (max-width: 992px) {
#termsfeed_pc1_notice_banner .termsfeed-pc1-notice-banner-layout {
bottom: 64px; /* the height of your bottom bar */
}
}
Cause 2: The consent banner is taller than the screen
A consent banner with long text grows as tall as a small screen, and the visitor then scrolls inside it to reach the last lines and buttons. Long translations and the vendor category switches add height, so the visitor does not see every button without scrolling. A root with the class termsfeed-pc1-modern limits itself on screens up to 640 pixels wide, so it rarely reaches this point. It stops at 85% of the viewport height, with its text at 36%. A Simple or Headline consent banner grows up to the full screen height and then scrolls inside itself.
The Elements tab shows the height. Select .termsfeed-pc1-notice-banner-layout inside #termsfeed_pc1_notice_banner and compare its height in the Computed pane with the screen height in the device toolbar.
Limit the text area to 40% of the screen height and let it scroll, which leaves the buttons outside the limit. Lower 40vh on a page that keeps a bottom bar from Cause 1, so the text, the buttons, and the bar fit together.
@media (max-width: 992px) {
#termsfeed_pc1_notice_banner .termsfeed-pc1-notice-banner-content {
max-height: 40vh;
overflow-y: auto;
}
}
A page whose viewport meta tag includes viewport-fit=cover extends under the home indicator on phones with no home button. Add padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); on .termsfeed-pc1-notice-banner-inner in the same rule on such a page, so the buttons stay above it.
Cause 3: Text runs past the edge of the consent banner
Inherited styles stop at the consent banner, so clipped text comes from a rule of yours that matches its elements directly, or from a long word. Privacy Consent resets the root, which keeps out fonts, spacing, and text case your <body> passes down. A rule marked !important, or one that outranks the Privacy Consent rule, such as body.home a, still applies. The "Inherited" option under "Choose a font" lets your site font in on purpose, and a wide font makes the text longer.
The Computed pane of the Elements tab names where each style comes from. Select the clipped text inside #termsfeed_pc1_notice_banner and expand white-space, letter-spacing, text-transform, and font-size. A value that links to your own stylesheet points to the rule to change.
Remove !important from any generic rule of yours that reaches the consent banner, such as a rule on div or a. Then add this rule, which lets a long word or address wrap inside the screen.
#termsfeed_pc1_notice_banner .termsfeed-pc1-notice-banner-content {
white-space: normal;
overflow-wrap: anywhere;
}
Keep the floating button clear of chat widgets
The floating "Privacy Preferences" button sits in a bottom corner of the screen with z-index: 999, which is where most chat widgets place their launcher. A launcher with a higher z-index hides the button, and visitors then have no route back to the Preferences Center from it.
Move the floating button up with this rule, using a value that clears the launcher, or set right: auto and left: 12px to move it to the other corner.
#termsfeed_pc1_sticky_element_placeholder {
bottom: 88px;
}
How to test the consent banner on a real phone
The test takes 5 steps and about 10 minutes, from a location where the consent banner shows. The device toolbar in Chrome DevTools is the quick first check, and a real phone confirms it, because its browser toolbars change the visible area.
- Open your site in Chrome DevTools, click "Toggle device toolbar", and choose a small phone, such as a model 375 pixels wide.
- Open the Network tab, type
.cssinto the filter box, reload, and confirm that your stylesheet returns status 200. - Select
#termsfeed_pc1_notice_bannerin the Elements tab and confirm that your rules appear in the Styles pane with no line through them. - Open your site on a real phone in a new private window, so no stored answer hides the consent banner.
- Check that your navigation bar, the text, and the I Agree and I Decline buttons are visible. Then tap I Decline and confirm that the floating button sits clear of the chat launcher.
These rules change position and size only. Change colors, fonts, and spacing with Custom CSS.