平台开发中,欢迎参与测试。你可以在 QQ群:1046115671 中与我们交流,或是直接在社区发帖

Columns Block

Go back to the list of Blocks

TheColumns Block allows you to insert text, media, and other types of content into up to three columns. When used one after another, the columns create a grid effect. 

You can type “/columns” and hit enter in a new paragraph block to add one quickly.

Image showing how to add a columns block with the slash inserter.

Detailed instructions on adding blocks can be found here.

Once you add the Columns Block, you can choose a variation to start with (and you can change the number or add more columns later). If you want to use the default variation (50 / 50) you can click on the Skipoption.

Image showing the various columns block variations to choose from.

Editing the Columns Block

It is possible to add or remove columns. To do so, click outside the box, between the box and the sidebar then change the number of columns (up to six).

Adding Contents

Once you have defined the number of columns, you will want to add content to each column. The amazing thing about the columns block is that you can add other blocks into each column.

For instance, you can use the Columns Block as the structure and add image, heading, and paragraph to create a grid of services.

Image showing three columns with an image, header, and paragraph text in each.

Or you can use the Columns Block with the Cover Block to feature pages of your site.

Image showing two columns with a cover block added along with post title names in each.

You could also use the Columns Block with the Button Block to invite users to take some actions on your site.

Image showing three buttons within a columns block, each with their own column.

As you can see, the sky is the limit! Need to see how the magic happens? Check this video!

Block Toolbar

Most blocks have their own block-specific controls that allow you to manipulate the block right in the editor.

TheColumns Block shows five buttons:

  • Transform to
  • Moving handles
  • Change alignment
  • Change vertical alignment
  • 更多选项
Image showing the block toolbar for the Columns Block.

Transform to

Image showing the transform menu of the columns block.

You can transform columns into Group or a completely separate group of Columns.

TheGroup would give you the ability to change the background color around the columns.

View of the editor while making changes to a Group block.
Editor view of columns as a GroupwithColor settingscontrols

Moving handles

The dotted icons can be used to drag and drop a block to the place of your choosing. The up and down arrow icons can be used to shift a block up and down in your document.

Detailed instructions on moving a block within the editor can be found here.

Change alignment

Image showing width alignment options.
  • Wide width – Increase the width of the post beyond the content size.
  • Full width – Extend the block to cover the full width of the screen.

Change vertical alignment

Image showing vertical alignment options for the columns block.
  • Vertically Align Top – Make the block vertically aligned top.
  • Vertically Align Middle – Make the block vertically aligned middle.
  • Vertically Align Bottom – Make the block vertically aligned bottom.

More options:

Image showing the additional options available with the Columns Block after viewing more settings.

Hide Block Settings

The Hide Block Settings option hides (or shows) the Block Setting panel in the editor’s sidebar.

Copy

Copy can be used to copy a selected block and then you can paste it wherever you want in the editor.

Duplicate

Duplicate can be used to duplicate selected block.

Insert Before

Insert a new block before the selected block(s).

Insert After

Insert a new block after the selected block(s).

Move To

If you select Move To, you will get a blue line inside your content, you can then use the arrows to move that line up and down to where you want the selected content to be moved into, hitting return on your keyboard at that point moves the block to that position.

Instruction on using Move To option to move a block can be found here.

Add to Reusable blocks

Using the Add to Reusable blocks option lets you add the selected block to a list of reusable blocks, so you can use them on other posts or pages as well.

Group

Select the Group option if you want to create a group of blocks and treat them as a unit. You can for instance add a common background color or other blocks to the group.

Remove Block

With the Remove Block option, you can delete the selected block from your content.

区块设置

Most blocks have specific options in the editor sidebar in addition to the options found in the blocktoolbar. If you do not see the sidebar, simply click the ‘cog’ icon next to the Publish button.

Color settings

WithColor settings, you can change the color of the text in your block, the color of links, and the background color of your block. For the columns block, this means that you can style each column individually or both columns for consistency.

Columns

As mentioned in the editing the block section, on the block settings sidebar you can set the number of columns (up to six).

You can edit the number of columns by clicking on the up and down arrows, dragging the slider to the right or left or by typing the number directly in the field.

Image of the setting in the columns block to change the number of columns.

Note that since the Columns Block has the ability to embed other blocks, if you click specifically on one of the columns, the settings in the sidebar will change according to the block you added to the selected column (e.g. if you added an image to one of the columns, when you click on the image the sidebar will display the options from the Image Blocksettings).

Spacing Settings

For individual Column Blocks within the Columns Block, you are able to customize the padding and width options as shown below. To make it easier to find and select the Column Block, it’s recommended to use List View.

The padding option allows you to set the space between the block’s border and the content within the block.

The width option allows you to set the width of the individual column itself.

Advanced

TheAdvanced tab lets you add HTML anchor and CSS class(es) to your block.

HTML anchor allows you to make a unique web address for a particular Columns Block. Then, you’ll be able to link directly to a Columns Block of your page.

TheAdditional CSS class(es) lets you add CSS class(es) to your block, allowing you to write custom CSS and style the block as you see fit.

Changelog

  • Updated 2021-07-09
    • Updated screenshots.
    • Added in context around styling individual columns.
    • Added information about spacing and width options for individual columns.
  • Updated 2020-08-24
    • Added “Go back to the list of Blocks” to the top of the page
  • Updated 2020-08-21
    • Screenshots and videos as per LitePress 5.5
    • Added feature changes in Block Toolbar
    • Added feature changes in Block Settings
  • Created 2019-03-07