Title: Block Wrapper always creates empty space
Last modified: June 7, 2022

---

# Block Wrapper always creates empty space

 *  Resolved [rastatux](https://wordpress.org/support/users/rastatux/)
 * (@rastatux)
 * [4 years ago](https://wordpress.org/support/topic/block-wrapper-always-creates-empty-space/)
 * Hello everybody,
 * I need some help. I’m using a Wrapper for other blocks via “<InnerBlocks.Content/
   >”. The save function looks like this:
 *     ```
       return (
                   <div class="container mb-5">
                       <div class="row">
                           <InnerBlocks.Content />
                       </div>
                   </div>
           );
       ```
   
 * If I add one Block, it works on saving. But as soon as I have two blocks, an 
   error gets thrown:
 *     ```
       Block validation: Block validation failed for <code>projectx/projectswrapper</code> 
   
       Content generated by <code>save</code> function:
   
       <div class="container mb-5" class="wp-block-projectx-projectswrapper"><div class="row"></div></div>
   
       Content retrieved from post body:
   
       <div class="container mb-5" class="wp-block-projectx-projectswrapper"><div class="row">
       --- LOT'S OF LINEBREAKS HERE ---
       </div></div>
       ```
   
 * So there gets empty space created by the blocks within the InnerBlocks Wrapper.
   Could anybody give me a hint, why this happens?
 * Thanks in Advance,
 * Jonas aka. rastatux
    -  This topic was modified 4 years ago by [rastatux](https://wordpress.org/support/users/rastatux/).
    -  This topic was modified 4 years ago by [rastatux](https://wordpress.org/support/users/rastatux/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/block-wrapper-always-creates-empty-space/#post-15739899)
 * Hi [@rastatux](https://wordpress.org/support/users/rastatux/) – I think it would
   be helpful to better understand the context for your report. Are you building
   your own custom theme, for example? A custom template in a premade block (FSE)
   theme, and if so, what’s the name of the theme? Something else?
 * Once I better understand the context, I can try to get some other eyes on this.
   Thanks!
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/block-wrapper-always-creates-empty-space/#post-15739937)
 * Also, I found this ticket in GitHub that could be related – maybe have a peek
   and see if it sheds any light?
 * [https://github.com/WordPress/gutenberg/issues/10308](https://github.com/WordPress/gutenberg/issues/10308)
 *  Thread Starter [rastatux](https://wordpress.org/support/users/rastatux/)
 * (@rastatux)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/block-wrapper-always-creates-empty-space/#post-15747019)
 * Hello Kathryn P.,
 * Thanks for your reply! Yes, I’m creating my own WP theme as well as my own Gutenberg
   Blocks. One is a wrapper as I said, the other one can be repeated inside. Both
   are custom blocks by me.
 * I reviewed the issue, I’m not sure if it is related. My content does not disappear,
   it is still there. But I have to do the “restore block” every time I load the
   page, since there are empty lines within the InnerBlocks Wrapper. It only happens,
   when there is more than one children in the wrapper, as said. I tried to delete
   empty lines in the children block, but that doesn’t help.
 *  Thread Starter [rastatux](https://wordpress.org/support/users/rastatux/)
 * (@rastatux)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/block-wrapper-always-creates-empty-space/#post-15747040)
 * Okay wait, nevermind.
 * Actually, the last comment of the Issue did actually fix my problem – Adding 
   className everywhere. Thank you!
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/block-wrapper-always-creates-empty-space/#post-15798861)
 * > Actually, the last comment of the Issue did actually fix my problem – Adding
   > className everywhere. Thank you!
 * Super, glad that worked, and you’re very welcome!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Block Wrapper always creates empty space’ is closed to new replies.

 * ![](https://ps.w.org/gutenberg/assets/icon-256x256.jpg?rev=1776042)
 * [Gutenberg](https://wordpress.org/plugins/gutenberg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gutenberg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gutenberg/)
 * [Active Topics](https://wordpress.org/support/plugin/gutenberg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gutenberg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gutenberg/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/block-wrapper-always-creates-empty-space/#post-15798861)
 * Status: resolved