Skip to content

How to style alignfull and alignwide #8289

@manake

Description

@manake

The documentation https://wordpress.org/gutenberg/handbook doesn't contain information on how to style alignfull and alignwide.

  • jQuery('body').width() returns 1884
  • window.innerWidth returns 1901

When I do:

.alignfull {
	margin-left: calc( -100vw / 2 + 100% / 2 );
	margin-right: calc( -100vw / 2 + 100% / 2 );
	max-width: 100vw;
}

then the resulting container is 1901px wide (thus producing horizontal scrollbar). To make it right it would have to be 1884px.

Can you please clarify how themes should style alignfull?

These places (top google results) contain wrong styling information:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions