1. PROMO Get 60% OFF Lifetime Pro Membership & access all our Pro Divi Extensions, Divi Layouts, Divi AI Generator, Divi Block, etc.VIEW PRICING
Dismiss Notice
UPDATE Custom Color Scheme + Premade Divi Layouts - A perfect combination to boost productivity. New 'Gadget Repair' layout added.Try our Custom Color Layouts
BEST Divi Block - A revolutionary online drag & drop tool to easily mix & match 478+ premade blocks to kick start your Divi site design. Special module designs are included as well.
Learn MoreTry Free Version

How to make Divi text module editor toolbar sticky?

Discussion in 'Divi Tutorials' started by Divi.Help, Jul 11, 2021.

  1. Divi.Help

    Divi.Help Administrator
    Staff Member

    If you have a long content in the text module settings, it would be troublesome for you to scroll up & down to access the text editor toolbar.

    But here's a simple CSS solution to solve the issue.

    Just paste the below CSS in Divi > Theme Options > Custom CSS:
    Code:
    .mce-top-part {
        position: sticky!important;
        top: -60px;
    }
    upload_2021-7-11_16-25-44.png

    The above solution works for Visual Builder, but not backend builder.

    For backend builder, you will need to paste the below code in your child theme functions.php:
    Code:
    add_action('admin_head', 'divi_help_wp_admin_css');
    function divi_help_wp_admin_css(){
        echo '<style>
            .mce-top-part {
                position: sticky!important;
                top: -60px;
            }
        </style>';
    }
    That's all. Hope you enjoy it.
     
    1. PRO MEMBER PERKS Divi Cart Count Plugin - Easily add cart count to your Divi cart icon. 6 different styles to choose from:Learn More
  2. wpatters1229

    wpatters1229 New Member

    OK will give this a try...BUT why doesn't Divi put this into the product instead of having to do CSS on everysite we work on? Hope they decide to update the module.
     
  3. wpatters1229

    wpatters1229 New Member

    OK the front end css works but not the backend. Would not make the change. Gave me an error. Now I was making the change in the Divi code direct rather than a child theme. Would that make a difference? It shouldn't. It was in the function.php page at the end.
     
    1. PRO MEMBER PERKS Divi Ultimate Archive Plugin - Beautify your Divi archive / category page with 15 different premade blog designs:Learn More
  4. Divi.Help

    Divi.Help Administrator
    Staff Member

    You may suggest it to official Divi support at: https://elegantthemes.com/members-area/help
    You can do that as well. I just tested the code in the parent theme functions.php & it works. What error you're seeing?
     
  5. wpatters1229

    wpatters1229 New Member

    This is the error message "Scrape nonce check failed. Please try again." Never seen this before ???
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade testimonial carousel design for your Divi site without using any plugins:View Demo
  6. wpatters1229

    wpatters1229 New Member

    I tried deactivating all the plugins as I read that the SG Optimizer can cause this...no fix. Maybe the code is wrong? Here is the code I used:

    add_action('admin_head', 'divi_help_wp_admin_css');
    function divi_help_wp_admin_css(){
    echo '<style>
    .mce-top-part {
    position: sticky!important;
    top: -60px;
    }
    </style>';
    }
     
  7. Divi.Help

    Divi.Help Administrator
    Staff Member

    Try to use FTP instead to edit it.
     
    1. PRO MEMBER PERKS Divi Block Pro - Easy-to-use drag & drop interface to mix & match 456+ premade Divi blocks & export as json file:Learn More
  8. wpatters1229

    wpatters1229 New Member

    YES that did it. I just went to file manager and added the code at the top of the file under the php notation and it works fine. Must have been something in the theme or the hosting. Works now in both the front end and back.
    Cheers!! Now if Divi will add this to the main theme and text module. It should be standard as many pages have long text content.
     
  9. JasonDivi

    JasonDivi New Member

    Great post, guys! Very helpful. I applied this code successfully!

    How do we also make the on-hover "settings bar" sticky? Please see my image.

    [​IMG]
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade content toggle design for your Divi site without using any plugins:View Demo
  10. Divi.Help

    Divi.Help Administrator
    Staff Member

    To make the Divi module settings bar sticky, try the below CSS in Divi > Theme Options > Custom CSS:
    Code:
    .et-fb-component-settings--module {
        height: 100%;
    }
    .et-fb-component-settings--module .et-fb-button-group {
        position: sticky!important;
        top: 50px!important;
    }
     
  11. Jhonny

    Jhonny New Member

    Great, It works
     
    1. PRO MEMBER PERKS Divi Ultimate Archive Plugin - Tons of elegant premade sidebar styles to choose from for your Divi site:Learn More
  12. Earl654

    Earl654 New Member

    Thanks for this.

    Is it also possible to make the "Add Media" button, located just above the mce-toolbar, sticky as well?
     
  13. Divi.Help

    Divi.Help Administrator
    Staff Member

    Try the below CSS instead:
    Code:
    .et-db #et-boc .et-l .et-fb-option--tiny-mce .et-fb-tinymce-add-media-button {
        position: sticky!important;
        top: -60px;
        display: block!important;
        margin-bottom: -28px!important;
        z-index: 1;
    }
    .mce-top-part {
        position: sticky!important;
        top: -30px;
    }
     
    1. PRO MEMBER PERKS Divi.Help Pro Layout Packs - Agency Divi layout pack featuring unique comment design on single blog post page:View Demo
  14. Earl654

    Earl654 New Member

    Magic! That works and saves a whole lot of mousing up and down. Much appreciated :)
     
    Divi.Help likes this.
  15. davidoliver

    davidoliver New Member

    To make the Divi text module editor toolbar sticky, you can use CSS code to add a fixed position to the toolbar. Here are the steps:

    1. Open the page with the Divi text module that you want to make the toolbar sticky on.

    2. Click on the Text module to open the module settings.

    3. Click on the "Advanced" tab and scroll down to the "Custom CSS" section.

    4. In the Custom CSS section, add the following code:
    css
    .et_pb_text_inner {
    position: sticky;
    top: 0;
    z-index: 999;
    }

    1. Save your changes.
    This CSS code will make the toolbar sticky and keep it fixed at the top of the screen as you scroll down the page.

    Note: If you have multiple text modules on the same page and you only want to make the toolbar sticky for one of them, you can add a unique CSS class to the text module by clicking on the "CSS ID & Classes" tab in the module settings, and then modify the CSS code above by replacing .et_pb_text_inner with your unique CSS class name.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade logo carousel design for your Divi site without using any plugins:View Demo