How to have blocks of different width in the content region?

Created on 29 April 2025, 17 days ago

Problem/Motivation

Hi,
Principally I would like to have the following:

Header - full width
Menu - full width
Hero section - full width
body field - specific width for good readabillity e.g max 1080 px
A block below the text - full width

I think going about it by setting everything to full width and only the node body to something narrower would be the easiest.

My question: are there any recommended styles I can set on a node or entity field in order to make it narrower than full width?

Or is there some other obvious solution I just don't see?

Thank you!

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria maxilein

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @maxilein
  • πŸ‡ΊπŸ‡ΈUnited States flashwebcenter Austin TX

    Hello,

    To achieve this without writing any code:

    1. Navigate to Global Site > Theme settings, and set the layout width to 100%.
    2. Download and install the Paragraphs Bundles β†’ module.
    3. You can add a paragraph field to any content type and begin using any of the available bundles.
    4. Each bundle includes a configurable maximum width, ranging from 300px to 1000px.
    5. Alternatively, if you prefer not to modify an existing content type, install the Paragraph Bundle Content bundle.
    6. This provides a dedicated content type designed specifically for the Solo theme, with built-in width settings.

    If you'd rather apply this using CSS:
    1- Override the site's width variable by targeting the #page-wrapper element:

    #page-wrapper {
      --solo-width: 100%;
    }

    2- Control the maximum width of full node content using the following rule:

    #page-wrapper .node.node--view-mode-full .node__content {
      max-width: 1080px;
      margin: 0 auto;
    }

    This ensures the content is centered and constrained within a specified width, while the overall layout still respects the 100% setting.

    Best wishes,
    Alaa

  • πŸ‡¦πŸ‡ΉAustria maxilein

    Thank you so much!

  • πŸ‡ΊπŸ‡ΈUnited States flashwebcenter Austin TX

    You are welcome!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024