Gutenberg: How to float core table block in front-end of site?
-
Hi.
In the editor, the core table block has a parent div, so it’s easy to float the table to the left or right. In the front-end of the site, this block doesn’t have a parent div, how can it be floated to the left & right in the front-end, please?
In the editor there is a parent div and then the figure.
.editor-styles-wrapper .wp-block[data-align=right] { position: relative; } .editor-styles-wrapper .wp-block { max-width: 1000px; } .wp-block[data-align=right]>* { float: right; margin-left: 2em }
-
Editor code:
<div class="wp-block" data-align="right"> <figure id="block-f0" data-type="core/table" data-title="Table" class="block-editor-block-list__block wp-block-table">
In the front-end the core table block doesn’t output a parent div, so how can it be floated to the left or right, please?
.entry-content > * { margin: 40px auto; max-width: 1000px; padding-left: 5px; padding-right: 5px; } <div class="entry-content"> <figure class="wp-block-table alignright is-style-stripes">
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Gutenberg: How to float core table block in front-end of site?’ is closed to new replies.