Add Sitewide Banner Above Top Navigation

Add Sitewide Banner Above Top Navigation

You can call attention to a sale or a special announcement to your website's visitors by adding a sitewide banner above your website's top navigation bar.

Screen_Shot_2021-11-19_at_4.53.32_PM.png

This process involves building a text block, then adding some custom CSS and JS code to your site to place the banner above the navigation bar.  Note: This will not appear on mobile devices if you have the floating footer activated.

 

  1. Navigate to your website's Content panel and select Footer under the Global Settings section.
    Screen_Shot_2021-11-19_at_4.11.36_PM.png
  2. Create a new Text Block by clicking one of the green (+) buttons and selecting Text from the menu options.
    Screen_Shot_2021-11-19_at_4.13.20_PM.png
  3. Enter the desired content into the Description field. You can add plain text, hyperlinks, or buttons.
    Screen_Shot_2021-11-19_at_4.15.43_PM.png

Step 2: Preview the Page and Copy the Block Wrap ID

  1. In a new browser tab, open up livebooks.com/preview to open up a preview of your website. 
  2. Once the website is pulled up, right-click (or CTRL+click) anywhere on the page, then select Inspect from the menu that appears.
  3. You will see the content you added in the website's Footer. With the Inspect tool open, hover your cursor over the content you added, and then find the Block Wrap ID in the Inspect tool (see screenshot below). Copy the Block Wrap ID (you will only need to copy the code segment inside the circle in the screenshot below) and paste it into a clipboard or empty document - you will need it for later.
    Screen_Shot_2021-11-19_at_4.54.26_PM.png

 

Step 3: Add Custom CSS

  1. Navigate to the Developer Tools dashboard by clicking the [<>] icon at the top of the page (Don't see that icon? Learn more here.), then navigating to the CSS page.
  2. On the first empty line in the CSS field, paste the code below:
    /* Sitewide Banner */

    .blockWrap_c7b6f99b274b47f5b010b83a549f1e41{
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    padding: 10px;
    }

    .headerAndNavContainer{
    padding-top: 0px !important;
    }
  3. Replace the existing "Block Wrap" code with the Block Wrap ID that you copied in the Inspect tool (replace everything between the . icon and the { icon). Click Save.
    Screen_Shot_2021-11-22_at_3.14.56_PM.png
  4. OPTIONAL: Choose the color of your text and background by swapping out the color hex codes. You can find color hex codes here. Once you choose your colors, replace the placeholder hex codes with the code of your choice. Click Save.
    Screen_Shot_2021-11-19_at_4.46.21_PM.png

Step 4: Add Custom JS

  1. Select Body JS at the top of the Developer Tools dashboard.
  2. On the first empty line in the Body JS field, paste the code below:
    // Sitewide Banner

    $('.blockWrap_a6b2668dd95044cfbe3e7cc3153e3c4b').prependTo('.headerAndNavContainer');
  3. Replace the existing "Block Wrap" code with the Block Wrap ID that you copied in the Inspect tool (replace everything between the . icon and the ' icon). Click Save.
    Screen_Shot_2021-11-19_at_4.54.26_PM.png

 

Step 5: Preview and Publish

After completing the above steps, preview your website to see how the banner looks. If everything looks good, then you can click the green Publish button at the top of your dashboard to push it live on your site! If the banner is not appearing, please review each step above to make sure nothing was overlooked.


    • Related Articles

    • Add Sitewide Design Formatting

      Use the Sitewide settings within the Design panel to establish design settings for all of your blocks. This is helpful for people trying to create visually cohesive pages with similar block styles. To set all of your Sitewide styles: 1. Select the ...
    • Enable Mobile Navigation on Desktop

      You can use your website's mobile navigation even when it's viewed on a desktop. This can create a consistent experience for your visitors, especially if you prefer the mobile menu's compact design. Steps to Use Mobile Navigation on Desktop View ...
    • Change the Font/Text Style of Your Navigation Menu

      You can change the font or text style of your Navigation menu items on your website's Design panel. Follow the steps below to change the appearance of your navigation menu. Click DESIGN at the top of your design.livebooks.com dashboard. Click the ...
    • Add or Remove Padding from the Navigation Menu

      There are two ways to add and remove the padding from the navigation menu, on a site-wide scale and on a page-by-page basis. To remove the padding on a sitewide level, follow these steps: 1. Select Design 2. Select Sitewide in the Design panel on the ...
    • Change the Layout/Spacing of Your Navigation

      Here is how to stylize your navigation menu in the Design Editor: 1. Select Design 2. Select Navigation under Sitewide on the right 3. Select from one of the four layout options provided. The spacing toggle will increase and decrease the spacing ...