Opened 8 months ago
Closed 8 months ago
#63593 closed defect (bug) (reported-upstream)
Center Mode doesnt work in Guttenberg editor
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Editor | Keywords: | |
| Focuses: | css | Cc: |
Description
hi Dear,
when i try to center:
- Embemded WordPress
- Predefined Call to action template
and try to center it, clicking in the center mode, in the editor is running well, BUT in the front end its crashed.
please help me
Attachments (2)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Centering Embed blocks is a known issue, and I'll close as 'reported-upstream' because of that.
The rule
.post-content-wrap h2 { text-align: inherit; }in your site's CSS overrides the alignment for the.has-text-align-centerclass. Theinheritrule (for all heading levels) likely comes from the Houzez premium theme, but it might come from one of the plugins.Custom CSS to add
The Customizer (under Appearance) has an Additional CSS panel, and maybe your theme has another place to assign special styles.
I tried changing the width of the
figureelement, and it worked with the WordPress post embeds (on the front end):.wp-block-embed.aligncenter { width: fit-content; }GB41011 proposed this instead, and it worked for me too:
.wp-block-embed.aligncenter .wp-block-embed__wrapper { display: flex; justify-content: center; }For the heading(s), you could increase the specificity. Adding an element selector seems sufficient:
html .has-text-align-center { text-align: center; }Or you might like to raise the specificity level higher with something like
:rootor class names::root .has-text-align-center { text-align: center; }If you need help with other aspects of your site, please use the support forums.
https://wordpress.org/support/forums/